Hi, This issue was already fixed by Ulrich Arnold in SVN. He used the same fix as you, so your fix is completely right.
Please try to use the SVN version as it contains many more fixes than the last
release and is much more stable.
Best regards,
Dom
Am Dienstag, 29. September 2009 schrieb Lidia Kalinovsky:
> Hello,
>
> I guess I've found bug.
>
> The following code fails for attached file:
>
> PdfVecObjects objects;
> PdfParser parser;
> const PdfVecObjects* pdfObjects;
>
> objects.SetAutoDelete( true );
> parser.ParseFile( mFilename.c_str(), true);
> pdfObjects = parser.GetObjects();
>
> The following change fixes the problem: (change in red)
>
> file PdfVecObjects.cpp
>
> void PdfVecObjects::push_back( PdfObject* pObj )
> {
> if( pObj->Reference().ObjectNumber() >= m_nObjectCount )
> // Peter Petrov 18 September 2008
> {
> // This was a bug.
> //++m_nObjectCount;
>
> // In fact "m_bObjectCount" is used for the next free object
> number. // We need to use the greatest object number + 1 for the next free
> object number.
> // Otherwise, object number overlap would have occurred.
> m_nObjectCount = pObj->Reference().ObjectNumber() + 1;
> }
>
> if( !m_vector.empty() && pObj->Reference() <
> m_vector.back()->Reference() ) // previously, it was
> m_vector.back()->Reference() < pObj->Reference()
> m_bSorted = false;
>
> pObj->SetOwner( this );
> m_vector.push_back( pObj );
> }
>
> Could you please confirm that this is bug and not misusing of the podofo ?
> If yes, could you please insert it to the next version of podofo ?
>
> Thanks.
--
**********************************************************************
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
**********************************************************************
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
