Funcionalidade dos títulos das seções sobre imagens PDF válida apenas no modo ininterrupto

Funcionalidade dos títulos das seções sobre imagens PDF válida apenas no modo ininterrupto

ATUALIZADA. O código a seguir é funcional, mas o pdf só é gerado se a tecla Enter for pressionada quando mensagens de aviso aparecerem. Minha solução no momento é executá-lo em modo ininterrupto, como: abra o cmd no local apropriado e digite 'pdflatex -interaction nonstopmode example.tex'. Eu queria saber se havia alguma maneira de obter os mesmos resultados de maneira limpa, ou seja, sem a necessidade de passar pelos avisos.

\documentclass[10pt, a3paper]{article}
\newcommand{\projecttitle}{Interaction Nonstopmode}

\usepackage{tikz}
\usepackage{pdfpages}
\usepackage{pdflscape}
\usepackage{geometry}

\geometry{
a3paper,
left=23mm,
top=15mm,
right=10mm,
bottom=15mm,
headheight=38pt,
includeheadfoot,
showframe=false
}

\begin{document}

\tableofcontents

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\section{Section 1}}; \end{tikzpicture}}]{any_pdf_image.pdf}

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\section{Section 2}}; \end{tikzpicture}}]{any_pdf_image.pdf}

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\section{Section 3}}; \end{tikzpicture}}]{any_pdf_image.pdf}

\end{document}

Responder1

O xwatermark coloca a marca d'água em um \parbox de tamanho \paperwidth/\paperheight. Ao tentar dimensionar isso em 12 e depois girá-lo, a dimensão fica muito grande. Mova a escala para a savebox.

O segundo problema é que você está usando \section dentro de um \node. Isso é bastante ousado. Esconda-o em um \parbox:

\documentclass[10pt, a3paper]{article}


\newcommand{\projecttitle}{Interaction Nonstopmode}

\usepackage{tikz}
\usepackage[printwatermark]{xwatermark}
\usepackage{pdfpages}
\usepackage{pdflscape}
\usepackage{geometry}

\geometry{
a3paper,
left=23mm,
top=15mm,
right=10mm,
bottom=15mm,
headheight=38pt,
includeheadfoot,
showframe=false
}

\newsavebox\mybox
\newsavebox\mybox
\savebox\mybox{\scalebox{12}{\tikz[color=gray!1000,opacity=0.3]\node{DRAFT};}}
\newwatermark*[allpages,angle=45]{\usebox\mybox}


\begin{document}
\tableofcontents \thispagestyle{fancy}
\addtocontents{toc}{\protect\thispagestyle{empty}}
\pagenumbering{gobble}

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\parbox{\linewidth}{\section{Section 1}}}; \end{tikzpicture}}]{example-image.pdf}

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\parbox{\linewidth}{\section{Section 2}}}; \end{tikzpicture}}]{example-image.pdf}

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\parbox{\linewidth}{\section{Section 3}}}; \end{tikzpicture}}]{example-image.pdf}

\end{document}

informação relacionada