Page 1 of 1

Create png from only first page of pdf file

Posted: 2011-09-06T08:22:03-07:00
by michelle
Hi there, I am using the below command to create png images from pdf documents. I am only ever interested in the first page of the pdf document. That is, I only ever want a png of the first page of any pdf document. In my collection of pdf documents the number of pages range from 1 onwards. Is there a way to modify the below command to include saying "only convert the first page into a png, ignore the rest" ?

convert -density 300 input.pdf -scale 400000 output.png

Thank-you in advance, Michelle

Re: Create png from only first page of pdf file

Posted: 2011-09-06T09:18:21-07:00
by Bonzo
Try:

Code: Select all

convert -density 300 input.pdf[0] -scale 400000 output.png
I think that the count starts from 0 and not 1

Re: Create png from only first page of pdf file

Posted: 2011-09-07T09:05:19-07:00
by michelle
great. thank-you. it works perfectly. :)