I am now completely and totally baffled by this problem!!

I've done a complete re-install of the whole operating system + perl modules using the pre-installed perl5.10.1. All of this went almost without a hitch (I had a few problems installing both GD and Image::Magick) but I still end up with the same problem which seems to be totally random (it isn't, of course. I just don't know what's causing it!).

The problem itself is that I have a PDF printing program (printing invoices) that calls in a base pdf doc for layout and then adds text and one or more images to the page. Each document may have more than one page (but generally only 1) and several line items. Each line item has a block of text which may or may not stretch to a second (or more) line. This block is printed using TextBlock.

Generally only the base document is printed although, through debugging, I know that the data is being pulled from the database. On a few occasions when this happens a hard refresh will cause the full document to be printed, on other occasions (much more frequently) the page will print but will revert to just the base document if you do a hard refresh. As far as I can make out the program is more likely to display just the base document when the textblock stretches to more than one line or there are several line item descriptions close to the width of the textblock.

It all works perfectly on the old server (using perl5.10.0) but not on the new one.

I use Template Toolkit to manage text display and occasionally it will freeze at the point of displaying a list of records pulled from a Mysql database. Again, I have no idea why it happens but a hard refresh will always sort it out Maybe that could be a pointer?.

I have a similar pdf printing program which, so far, works flawlessly. the only differences between them (other than data) is that the good one uses $pdf = PDF::API2->new and doesn't use Textblock whereas the bad one gets its base page by $pdf = PDF::API2->open('filename.pdf');

I could paste the code but I just don't know what is relevant.

Can anyone help a poor sinner!


In reply to Re^3: Problems with PDF::API2 and TextBlock by dougconran
in thread Problems with PDF::API2 and TextBlock by dougconran

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.