如何使用 Coldfusion/iText 调整现有 PDF 的大小 [英] How do I resize an existing PDF with Coldfusion/iText

查看:27
本文介绍了如何使用 Coldfusion/iText 调整现有 PDF 的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过很多方法来更改新空白文档的页面大小,但我无法让它在我通过 pdfReader 访问的 PDF 上工作

I have seen plenty of ways to change the pagesize of a new blank document, but I can not get it to work on a PDF i've accessed via pdfReader

帮助?

推荐答案

不确定它是否有效,但这是我发现的

not sure if it works, but here's what I found

您可以使用适当的空白 PDF页面大小作为起点,然后覆盖右侧的 PDF 段使用 DDX 定位为水印.你之后可能需要展平PDF每个水印都已添加.

You can use a blank PDF of the proper page size as a starting point and then overlay the PDF segments in the right position as watermarks using DDX. You probably need to flatten the PDF after each watermark has been added.

http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62109

还没有测试过代码,但可能是这样的?

Haven't tested the code, but maybe something like this?

<cfpdf name="resizedPdf" action="addwatermark" source="blank.pdf" copyfrom="image.pdf">
<cfpdf name="resizedPdfWithFooter" action="addfooter" source="resizedPdf" text="xyz">

参见 <cfpdf> 文档:http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7995.html

这篇关于如何使用 Coldfusion/iText 调整现有 PDF 的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆