I tried both adding a transform matrix for each page and verifying that 
everything written is enclosed within a Save()/Restore() set.  I even tried 
removing the xObject I'm writing, and the problem still persists.

I can't get PoDoFo compiled on my local box to try PoDoFoBrowser, and the 
windows version link on the site seems to be broken.  I did try converting from 
pdf to a ps file using pdf2ps, and it generated this error:

> Error: /invalidrestore in --restore--
> Operand stack:
>    --nostringval--   --nostringval--
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--   
> --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   
> --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3   
> %oparray_pop   --nostringval--   2   1   8   --nostringval--   
> %for_pos_int_continue   1   8   %oparray_pop   --nostringval--   1   8   
> %oparray_pop   --nostringval--   --nostringval--   --nostringval--
> Dictionary stack:
>    --dict:1007/1123(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--   
> --dict:71/200(L)--   --dict:97/127(ro)(G)--   --dict:220/230(ro)(G)--   
> --dict:19/24(L)--   --dict:4/6(L)--
> Current allocation mode is local
> AFPL Ghostscript 7.04: Unrecoverable error, exit code 1


That makes me think there are mismatched restores, but looking at the code 
(which is only a few hundred lines) I can't see how that would be possible.

Do you have any more thoughts?

Thanks for your help!

Aaron C. Meadows
636.541.6139
[email protected]



On Aug 19, 2010, at 10:06 AM, Dominik Seichter wrote:

> Hi Aran,
> 
> Please take a look at this thread and its comments our SF.ent tracker:
> http://sourceforge.net/tracker/?func=detail&aid=3042917&group_id=154028&atid=790130
> 
> Make sure that you start with an initial transformation matrix when painting 
> on an page. This might require to enclode the existing contents into q Q 
> operators (save and restore).
> 
> Also try to take a look with PoDoFoBrowser on the actual content stream that 
> is created. 
> 
> BTW, your attached PDF works also find in Okular using Poppler.
> 
> Cheers,
>       Dominik
> 
> Am Mittwoch 18 August 2010 schrieb Aaron C. Meadows:
>> Hi PoDoFo'ers.
>> 
>> I have an issue with a PDF I'm generating, and I wondered if anyone could
>> help me with it.  Here is the situation:  It's basically a dynamically
>> generated report.  there is a standard layout of text and graphics that is
>> applied to every page (I call it an Overlay).  This is done with and
>> XObject.  I am using the same XObject for every page.  This Overlay is
>> showing up fine.  Additionally, I write a series of tables of text one
>> line at a time to the page.  When a page is full, I create a new page
>> (applying the above XObject to it) and continue writing new lines of text.
>> 
>> The problem I'm having is this.  for evey page after the first, only the
>> first line of text I write shows up.  This is the first line of test for
>> whatever the table I am writing is, the overlay shows up fine.  To make
>> matters more strange, if I open the PDF with Safari on the mac, using it's
>> native PDF rendering capabilities, the PDF looks perfect.  If I print from
>> Safari through a PDF print driver, or using the Mac's built in "Save as
>> PDF..." from the print dialog, the resultant PDF is fine and can be viewed
>> in any viewer.
>> 
>> Attached are the two files.  report186-safari-printed.pdf is the version
>> that works in any viewer, report186-other.pdf is the one that only works
>> right in Safari, but apparently has all the information such that loading
>> in Safari shows everything, and can generate the other one.
>> 
>> Thanks for any help or suggestions!
>> 
> 
> 
> -- 
> **********************************************************************
> Dominik Seichter - [email protected]
> KRename  - http://www.krename.net  - Powerful batch renamer for KDE
> KBarcode - http://www.kbarcode.net - Barcode and label printing
> PoDoFo - http://podofo.sf.net - PDF generation and parsing library
> SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE
> Alan - http://alan.sf.net - A Turing Machine in Java
> **********************************************************************

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to