I've narrowed this down a little. It looks like the problem is writing out the XRef and Trailer. The XRef overlaps itself at a few points (that's valid though, right?) and so the trailer's listed size comes from the last XRef subsection's first object and count (which is wrong because the last subsection was a short, overlapping subsection). I'm attaching a PDF generated from the PdfStreamedDocument merging. If someone with a better understanding could take a look at the XRef, I'd appreciate it. Thanks.

- Mike Slegeir

Mike Slegeir wrote:
I'm trying to use PdfStreamedDocument like so:
    PoDoFo::PdfStreamedDocument doc(out_filename);

    for(int i=0; i<num_inputs; ++i) {
        doc.Append( PoDoFo::PdfMemDocument(in_filenames[i]) );
    }

    doc.Close();
but the result is just two blank pages. I'm currently doing something like this:
   PoDoFo::PdfMemDocument doc;

    for(int i=0; i<num_inputs; ++i) {
        doc.Append( PoDoFo::PdfMemDocument(in_filenames[i]) );
    }

    doc.Write(out_filename);
which works perfectly fine. Is anyone able to offer some insight on why this doesn't work or any technical reasons that it shouldn't? I'd like to be able to use PdfStreamedDocument for this as merging lots of documents can take up a lot of memory seemingly unnecessarily.

- Mike Slegeir

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Attachment: podofo-merged.pdf
Description: Adobe PDF document

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to