2

Is it possible to print every page of the document to a separate pdf file, with a specific name.

\documentclass[12pt,a4paper]{article}
\begin{document}
page 1
\clearpage
page 2
\clearpage
page 3
\clearpage
\end{document}
1
  • 2
    not from tex, but there are several pdf tools that can split up the final pdf into pages May 7, 2020 at 14:16

1 Answer 1

2

To elaborate on the comment by David Carlisle, to split the final pdf page by page, one command line tool which achieves this would be

pdftk mydocument.pdf burst 

or also

pdfseparate inputfile.pdf inputfile-%d.pdf

where the second command demonstrates how to get some more control over the output file names.

5
  • @oliversm.How can I use your suggestions. I mean what are the codes to implement inside the tex file.
    – Hany
    May 7, 2020 at 14:32
  • 1
    As David Carlisle said in his comment, this is not something that is done within the LaTeX file, but rather a post processing stage done after LaTeX has produced one single PDF.
    – oliversm
    May 7, 2020 at 15:07
  • Perhaps it is possible to perform this after the document has been produced using answers similar to stackoverflow.com/questions/3252957/…, but in reality it is little/no/less effort to just perform this command after generation, and several IDEs could easily perform such a command after compilation.
    – oliversm
    May 7, 2020 at 15:12
  • @– oliversm. I am sorry. I am not a programmer. Would you please tell me how to do it. Give me something I can write down and excute.
    – Hany
    May 7, 2020 at 16:26
  • 1
    @Hany they mean type exactly those commands in the terminal window after running latex. Of course you have to have the commands installed if not already, but google should find them: the exact details depend on your operating system. The point is these work for any pdf it is not related to tex. May 7, 2020 at 16:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .