0

Note: I have already found solutions for Linux (see How to extract all pages of one big pdf file?) or solutions with Python, or solutions with freeware GUI tools.

How do I extract specific pages from a PDF on Windows, from command line (no GUI tool), and keep the original format (i.e. if it's a text input PDF, the output should not be an image PDF)?

I already tried with ImageMagick:

convert input.pdf[2,3,4] output.pdf                # numbering begins at 0, so [2,3,4] is for pages 3,4,5

and it works, but the output file is a PDF containing images, so it's much bigger than the input, and you cannot search by text inside the output PDF.

1 Answer 1

1

How do I extract specific pages from a PDF on Windows, from command line (no GUI tool), and keep the original format (i.e. if it's a text input PDF, the output should not be an image PDF)?

PDFtk (the tool mentioned in the accepted answer to your linked question) can do this. It is a cross-platform utility and offers builds for Windows. For performing operations from the command-line, you would want PDFtk Server.

Looking at the command-line examples for PDFtk Server, your example command would be something like:

pdftk input.pdf cat 3-5 output extracted.pdf

Notes

You must log in to answer this question.

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