如何在 PHP 中将 PDF 1.5 版转换为 1.4 版 [英] How to convert PDF version 1.5 to version 1.4 in PHP

查看:117
本文介绍了如何在 PHP 中将 PDF 1.5 版转换为 1.4 版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 PHP 中将 PDF 1.5 版转换为 1.4 版?谁能指出我正确的方向?

How to convert PDF version 1.5 to version 1.4 in PHP ? Can anyone point me in the right direction ?

推荐答案

我也有类似的需求,发现Ghostscript可以修改一个PDF版本.文档在这里:http://ghostscript.com/doc/current/Use.htm

I have a similar requirement, and found that Ghostscript can modify a PDF version. Documentation is here: http://ghostscript.com/doc/current/Use.htm

但是,我在文档中没有找到任何关于 dCompatibilityLevel 选项的具体内容.相反,我发现这篇文章展示了它的用法:http://rohieb.wordpress.com/2012/06/09/use-ghostscript-to-convert-pdf-files/

However, I didn't find anything specific about the dCompatibilityLevel option in the documentation. Rather, I found this article that demonstrated its use: http://rohieb.wordpress.com/2012/06/09/use-ghostscript-to-convert-pdf-files/

命令如下:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH 
  -sOutputFile=new-pdf1.5.pdf original.pdf

这篇关于如何在 PHP 中将 PDF 1.5 版转换为 1.4 版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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