Specifying pages/frames to read - converting PDF
Posted: 2013-02-21T09:49:58-07:00
Hi All,
interesting situation here. I have a few PDFs where random pages are inverted with white text on black background. I want to convert the entire document back to black text on white background, by specifying on the command line which pages to invert.
I found this useful blog post: http://blog.dillfrog.com/how-to-invert- ... agemagick/
It shows to specify frame/page numbers like so:
convert -density 300 -negate "in.pdf[24-28]" out.pdf
The problem is, there are pages I want to skip in the inversion process, but still have them in the final "out.pdf".
Is this possible? Can I specify only to invert pages 1 and 2 of a 10-page document, but still have a 10 page output file (with pages 3-10 untouched)?
I was thinking something such as this would be useful, using the caret to specify which pages to skip: convert -density 300 -negate "in.pdf[^0-23][24-28]" out.pdf
interesting situation here. I have a few PDFs where random pages are inverted with white text on black background. I want to convert the entire document back to black text on white background, by specifying on the command line which pages to invert.
I found this useful blog post: http://blog.dillfrog.com/how-to-invert- ... agemagick/
It shows to specify frame/page numbers like so:
convert -density 300 -negate "in.pdf[24-28]" out.pdf
The problem is, there are pages I want to skip in the inversion process, but still have them in the final "out.pdf".
Is this possible? Can I specify only to invert pages 1 and 2 of a 10-page document, but still have a 10 page output file (with pages 3-10 untouched)?
I was thinking something such as this would be useful, using the caret to specify which pages to skip: convert -density 300 -negate "in.pdf[^0-23][24-28]" out.pdf