Hi, 
PdfDocument::Append calculate the new object number by applying a constant 
offset. 
https://sourceforge.net/p/podofo/code/1837/tree/podofo/trunk/src/doc/PdfDocument.cpp#l301
 


The calculation is only valid if there is no object being created during the 
appending process. 
This is not always true. 

If we are using PdfStreamedDocument, 

The GetStream function will call PdfImmediateWriter::CreateStream to create 
PdfFileStream 
https://sourceforge.net/p/podofo/code/1837/tree/podofo/trunk/src/doc/PdfDocument.cpp#l305
 


In the constructor of PdfFileStream, there is new PdfObject being created 
m_pLength = pParent -> GetOwner () -> CreateObject ( PdfVariant ( static_cast < 
pdf_int64 > ( PODOFO_LL_LITERAL ( 0 ))) ); 
https://sourceforge.net/p/podofo/code/1837/tree/podofo/trunk/src/base/PdfFileStream.cpp#l48
 



Best regards, 
Shawn 




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to