![]() Just make sure that the pdfinfo and pdftk utilities are in your $PATH environment variable. First, put the number of pages into a variable: _endpage=$(( $(pdfinfo input1.pdf | grep Pages: | awk '.pdfĪnd run it like this: bash remove-my-4-pages.pdf myinput.pdf myoutput.pdf Hence you could script the whole process of removing the pages. ![]() Will show the collection of embedded metadata about the PDF. To automatically determine the number of pages, you could use pdfinfo (also available from MacPorts): pdfinfo input1.pdf 9.06 in a few weeks) can also do it: gs \ The very latest, still unreleased version of Ghostscript (which will become v. The commandline for pdftk (suggested by iolsmit) to remove the first 2 and the last two pages from a 30-page PDF named input1.pdf is this: pdftk \
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |