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.

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.