2

I am trying to merge separate PDF files, following this advice.

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdfmerge{file1.pdf,-}
\includepdfmerge{file2.pdf,1-3}
\end{document}

Now I would like to keep the page numbering as it is in file 1. File 2 has no page numbering so I would manually set the counter and turn on page numbering. I tried

\setcounter{page}{25} 
\pagenumbering{arabic}

but it didn't help: the page numbering didn't appear.

How can I turn on/off page numbering when merging separate PDF files?


Sad news: the url-s break down too.
Ali
  • 883

1 Answers1

4

You can use pagecommand option as in:

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdfmerge[pagecommand={\thispagestyle{empty}}]{template.pdf,1-3}
\setcounter{page}{25}
\includepdfmerge[pagecommand={\pagestyle{plain}}]{template.pdf,-}
\end{document}

Adjust the values appropriately.

In this example, watch the fourth page and that has page number of 25.

enter image description here