1

我试图 PDF 图像,我的图像大小是 1MB,最终的 PDF 是 20 MB。我已经将图像压缩到其最小可用尺寸。我能做些什么?

<cfdocument format="pdf" scale="50" overwrite="yes" localUrl="true" filename="result.pdf">
    <cfoutput>
        <img src="small.jpg" height="90%" width="90%" />
    </cfoutput>
</cfdocument>

更新:正如已经指出的那样,这个问题之前已经被问。我不想为后代删除它,但我自己投票关闭它。

4

1 回答 1

1

每当 CFDocument 因此类奇怪的问题而失败时,我总是使用 WKHTMLTOPDF 作为备份成功。如果您能够在您的服务器上安装它,那么使用 CFExecute 发送命令很容易:

http://wkhtmltopdf.org/

于 2016-05-02T19:22:40.980 回答