I know I have done this before, so I'm sure it's possible, I just forget how to do it. There's a way to tell convert to grab a specific page of a PDF, and I'd like to keep the format of that page as PDF.
|
ImageMagick is a tool for bitmap images, which most PDFs aren't. If you use it, it will rasterize the data, which is often not desirable. Pdftk can extract one or more pages from a PDF file.
If you have a LaTeX installation with PDFLaTeX, you can use pdfpages. There's a shell wrapper for pdfpages, pdfjam.
Another possibility (overkill here, but useful for requirements more complex that one page) is Python with the PyPdf library.
|
|||||
|
|
|
You can use subscript notation with
The index value depends on how the PDF exporter numbered the pages. In tests on files here, the numbers seem to be zero-based, so the above example gets you the second page in the document. I've seen examples online where they show letter indexes instead, since apparently the PDF creator "numbered" the pages in that document that way instead. Unfortunately, this doesn't give very good results, because ImageMagick assumes everything is pixel-based, and therefore rasterizes vector imagery, such as the typography in a typical PDF. A better tool for the job is Ghostscript, which you probably already have installed:
This passes the PDF data through unchanged, since Ghostscript understands PDF (a PostScript derivative) to a much deeper level than ImageMagick does. |
|||||
|