|Just another Perl shrine|
Corrupt PDFs with Scribus + PDF::Reuse + PDF::Tableby ides (Deacon)
|on Feb 20, 2008 at 22:22 UTC||Need Help??|
ides has asked for the
wisdom of the Perl Monks concerning the following question:
Dear fellow monks, I've run into a strange problem I can't seem to solve on my own and hope that someone has an idea of something else to try.
I've written a system that generates a bunch of PDF invoices for one of my clients. I built the initial visual layout of the top half of the first page with Scribus ( logo, various fields for client name, invoice date, subtotal, sales tax, grand total, etc. ) and use PDF::Reuse to fill in those values.
I then open the document PDF::Reuse created with PDF::API2 and append a PDF::Table onto it with the individual line items on the invoice.
The PDFs appear fine. You can view them in acroread, xpdf, even Adobe Reader on a Mac. All of the data is there and visible. The problem arises when you print them.
Some of them will generate strange PostScript errors that I can't make any sense of. Also, if you print multiple PDFs are once often the first PDF will be fine, but subsequent PDFs will not print out the data for the fields PDF::Reuse has filled in. Despite the fact that you can see the data when viewing the PDF.
I've upgraded Scribus to the latest stable version. Upgraded to the latest versions of PDF::API2, PDF::Reuse, and PDF::Table. Thinking maybe my older version of Scribus was generating a wonky template. Even went so far as to test a few PDFs with CAM::PDF instead of PDF::Reuse with the same results. I've fiddled with every PDF exporting option ( embedding or not the fonts, various versions of the PDF spec, using different fonts ). I've omitted the PDF::Table stage before and still see the same PDF::Reuse form field population issues on printing.
Has anyone run into a similar problem like this that might shed some light on what is going on? Anyone have an idea on a better way to accomplish the same goals? Any ideas are appreciated! Thanks!
NOTE: I would show you the code, but the system is quite a bit of code and considering the PDFs are generated without error and can be viewed I don't feel that this is likely an issue with my Perl source.
Frank Wiles <firstname.lastname@example.org>