Coldfusion 8 中 iText 或 cfPDF 中 PDF 中图像大小调整问题

发布于 2024-08-21 00:32:48 字数 258 浏览 6 评论 0原文

当我使用 CFPDF 或直接使用 iText 将图像插入到现有 PDF 中时,图像的大小会增加 1.5。

如何控制图像大小?

我的代码的灵感来自:
使用 ColdFusion 和向 PDF 添加动态图像iText

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 ColdFusion and iText

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡淡的优雅 2024-08-28 00:32:48

如果您正在制作目录类型 PDF,最好确保在 cfml 中手动将图像调整为特定的高度和宽度。

我之前已经在 Coldfusion 中将大量图像打印成 pdf,并遇到了一些问题,您可能会遇到以下情况之一:

1)图像分辨率高于屏幕。不久前我遇到过一个案例,图像设置为 300 dpi,而文档却没有设置。然而,它是由第三方 PDF 创建者提供的。

2) 您可能想检查要打印的 pdf 的分辨率(无论是屏幕 (72 dpi) 还是打印 (150+ dpi)),看看是否有问题。

3)如果可以的话,手动调整图像大小以达到最大

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文