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 <frank@revsys.com>
www.revsys.com


In reply to Corrupt PDFs with Scribus + PDF::Reuse + PDF::Table by ides

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.