Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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