简体   繁体   English

如何在Perl中阅读和操作PDF 1.5文件?

[英]How can I read and manipulate PDF 1.5 files in Perl?

There doesn't appear to be any Perl libraries that can open, manipulate, and re-save PDF documents that use the newer PDF version (1.5 and above I believe) that use a cross-reference stream rather than table. 似乎没有任何Perl库可以打开,操作和重新保存使用交叉引用流而不是表格的较新PDF版本(我相信1.5及以上)的PDF文档。 Does anyone know of any unix/linux-based utilities to convert a PDF to an older version? 有没有人知道任何基于unix / linux的实用程序将PDF转换为旧版本? Or perhaps there's a Perl module in CPAN I missed that can handle this? 或者也许在CPAN中有一个Perl模块我错过了可以处理这个问题?

Done! 完成! An hour ago, I uploaded CAM::PDF v1.50 to CPAN. 一小时前,我将CAM :: PDF v1.50上传到CPAN。 It now supports PDF v1.5 compressed object streams and cross-reference streams. 它现在支持PDF v1.5压缩对象流和交叉引用流。 I've tested it with a few PDF files that I found online, but I'd sure appreciate feedback (good or bad). 我用一些我在网上找到的PDF文件对它进行了测试,但我肯定会感谢反馈(好的或坏的)。

I would try running it through ghostscript with appropriate parameters. 我会尝试使用适当的参数运行ghostscript。

Something like gs -dBATCH -dNOPAUSE -sDEVICE=pdfwriter -dCompatibilityLevel=1.2 类似于gs -dBATCH -dNOPAUSE -sDEVICE=pdfwriter -dCompatibilityLevel=1.2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM