in reply to Re^2: Problems with PDF::API2 and TextBlock
in thread Problems with PDF::API2 and TextBlock
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!
|
|---|