Hi,
in my case i have a pdf with incremental updates.
Serval objects are read from stream.
In my pdf file there are same objects (same obj number) in different streams.
The result is that the m_vecObjects contains also double obj with the same
number.
The result pdf file cannot be read by the Adobe Acrobat 9, but by the Adobe
Acrobat 8. Adobe 8 is automatically correct the pdf file.
Ich have change the code of the ReadObjectFromStream function in PdfParser.cpp
and it worked for my case:
if(m_vecObjects->GetObject(PdfReference( static_cast<int>(lObj), 0LL )))
{
std::cout << "Object: " << lObj << " is double." << std::endl;
delete m_vecObjects->RemoveObject(PdfReference(
static_cast<int>(lObj), 0LL ),false);
}
m_vecObjects->push_back( new PdfObject( PdfReference( static_cast<int>(lObj),
0LL ), var ) );
Important: Do not RemoveObject with bMarkAsFree=true cause the xref table will
written wrong.
The PDF Spec says that every object has an unique number. Is the source pdf
wrong or parse PoDoFo the file in a wrong way ?
Thanks.
Best Regards
--
Der Newskiosk
Von Sommerloch keine Spur: Alle Top-News der großen Tageszeitungen aus
Wirtschaft, Politik, Sport, Lifestyle und mehr im News-Kiosk auf arcor.de.
http://www.arcor.de/rd/footer.newskiosk
------------------------------------------------------------------------------
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