简体   繁体   中英

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. Does anyone know of any unix/linux-based utilities to convert a PDF to an older version? Or perhaps there's a Perl module in CPAN I missed that can handle this?

Done! An hour ago, I uploaded CAM::PDF v1.50 to CPAN. It now supports PDF v1.5 compressed object streams and cross-reference streams. I've tested it with a few PDF files that I found online, but I'd sure appreciate feedback (good or bad).

I would try running it through ghostscript with appropriate parameters.

Something like gs -dBATCH -dNOPAUSE -sDEVICE=pdfwriter -dCompatibilityLevel=1.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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