I'm using TCPDF and the images in the generated PDFs are huge, 2-4 times the size of the actual images and they fall off of the page. I've changed the DPI settings manually in TCPDF (have since changed them back) as well as image width and height variables to absolute settings with no luck. Anyone have any tips or suggestions on getting my images to appear the normal size?

I would even consider hiring someone at this point.

Comments

charlie-s’s picture

It looks like TCPDF acts buggy if you have a source image with a DPI other than 72.

This was my suspicion and confirmed after testing. For example if you're in Windows and take a screenshot and paste directly from print-screen into Paint, you'll most likely get a 96 DPI image. (if you're interested in screen resolutions / dpi's then google it, I won't waste anyone's time here)

If you take a screenshot through some other means (such as Snipping Tool, shift-cmd-4 on OSX, or pasting somehow into Photoshop, you will probably get a 72 dpi image.

I guess this is a bug in TCPDF because the proportion of 72:96 and images going from 400 pixels across to 2000 pixels across is not a steady ratio.

jcnventura’s picture

Status: Active » Closed (won't fix)

It seems this is a TCPDF bug. Please report it to the TCPDF issue queue.

transmitter’s picture

Isn't there another way to tell tcpdf which version from imagecache to use?
I used the print.css for the print view, but it doesn't work for PDF.