Sutff about my job and comments about personal activities. Take a look to the first idea.

Tuesday, June 05, 2012

PDFs: imagemagick & poppler

I was looking for a way to extract images from pdfs to know the resolution of each embeded image.
poppler has a tool named "pdfimages" to extract images from the pdf, usage:

pdfimages -j file.pdf img

Then, use tools from imagemagick to read characteristics of the images, usage:
display img.jpg
identify -verbose img.jpg
imagemagick let create a pdf file from jpg images, usage:
convert imageA.jpg imageB.jpg file.pdf pdf