开发者

Sizing image problem in PDF whis iText or cfPDF in Coldfusion 8

开发者 https://www.devze.com 2022-12-19 17:01 出处:网络
WHen I insert a Image into a existing PDF whis CFPDF or directely whis iText, the size of my image is increased by 1.5.

WHen I insert a Image into a existing PDF whis CFPDF or directely whis iText, the size of my image is increased by 1.5.

How to control the image size?

my code are inspired from:

Adding a dynamic image to a PDF using ColdFu开发者_JAVA技巧sion and iText


If you are doing a catalogue type PDF it will be best to ensure your images are manually sized in the cfml to a certain height and width.

I have printed tons of images in Coldfusion into a pdf before and come across a few things, you might have one of the following:

1) Image resolution is higher than screen. I had a case, a while ago that the image was set to 300 dpi and the document wasn't. It was with a third party PDF creator however.

2) You might want to check the resolution of the pdf you're printing to (whether it's screen (72 dpi) vs. print (150+ dpi)) and see if there's something there.

3) If you can, size the images manually to have a maximum

0

精彩评论

暂无评论...
验证码 换一张
取 消