Page 1 of 1

Issue with pulling embedded TIFF images from PDF

Posted: 2008-07-24T07:48:32-07:00
by morlockx
Hi all,

I work for a company in the insurance industry. We get a lot of electronic form images sent to us in PDF form and we upload everything to our system in TIFF format. So I have been working on a piece of software that runs in the background and connects to our email server and pulls down emails with attachments and runs them through ImageMagick via JMagick. The issue I'm running into is that the image in the PDF is being shrunk somehow when its coming out. When I open the PDF in Acrobat Reader and save it to TIFF I get large, clear TIFF images. When I save the TIFF using ImageMagick, it is smaller and the text becomes virtually illegible as a result. I tried doing an automatic 25% scaling up of the image as I pulled it out but because I'm scaling up an already shrunken image, it just makes the illegible text a little larger, the data is already lost.

I'm not sure how to approach this. It's a real deal breaker for the project and I did my testing on PDF's that just contained text and a few small images (ie letters) and those came out great, it's these inbound form images that are causing the problems. Any help would be appreciated.

- Matt

Re: Issue with pulling embedded TIFF images from PDF

Posted: 2008-07-24T07:56:41-07:00
by Bonzo
Have you tried adding a density ?

Code: Select all

convert -density 300 input.pdf output.tiff

Re: Issue with pulling embedded TIFF images from PDF

Posted: 2008-07-24T08:22:05-07:00
by morlockx
Bonzo wrote:Have you tried adding a density ?

Code: Select all

convert -density 300 input.pdf output.tiff
No, I did not. That works beautifully on the command line. Now I just need to work it into my JMagick code. Thank you for the answer!

- Matt

Re: Issue with pulling embedded TIFF images from PDF

Posted: 2008-07-24T08:44:37-07:00
by morlockx
One other question. My TIFFs are randomly showing as white-on-black in specific viewers, and there doesn't seem to be any rhyme or reason as to why. I saw a topic on here about people adding individual images into an existing TIFF but I'm not doing that (I don't think). I'm setting the depth to 8 bits and the compression to group3 fax compression. Is there anything else I need to be doing to mitigate this?