I am ge开发者_Python百科nerating PDF from image stream but there is always a little difference in the size of actual image and the image scales down as well .
I am using TCPDF class for it
Please help....
Set up your image document at a resolution of 72dpi and the document size of A4 (or whatever size you set in tcpdf).
Then when you call $tcpdf->image('/path/to/image.ext')
the image should be the correct size.
Think in points - pixels aren't much use in a tcpdf-generated pdf space.
精彩评论