I happened to note that if you pass a PDF through imagemagick's 'convert', convert
I needed to merge several PDF files into a single document, and using PDF::API2 this is really easy. This was until I found that someone had accidentally set the PDF Encrypted on some of the files when they were generated.
pdfinfo is the natty little tool which told me they were encrypted. Then convert sorted the problem out for me.
PDF can be very picky and quite a few generators actually get it wrong, I've seen one file which when printed through windows corrupted some of the very small text, but when sent via CUPs actually crashed the printer (so windoz was somehow correcting, reminded me of bad HTML and browsers 'correcting').
It was eventually tracked down to the pdf2ps part, which did give warnings, once they were fixed (upgrading Cario and switching to pnm images) printing from either windoz or CUPs was fine.
Having said that I no longer fear having to generate something as a PDF and actually would go so far as to enjoy using them.
Re:CAM::PDF and PDF::API2
Ranguard on 2008-01-27T19:15:02
Cheers Chris, I'll remember to try CAM::PDF as well next time, speed hasn't been an issue yet, but one day it may well:)
Re:PDF API2 suitable for password encryption?
Ranguard on 2008-02-04T22:31:27
Not sure about the perl modules, if your on *nix then pdftk does this I think http://www.pdfhacks.com/pdftk/, I'd probably just shell out to that.Re:PDF API2 suitable for password encryption?
runrig on 2008-02-05T00:26:03
pdftk also runs on windows.