Hi!

I introduced the comment in patch 1131:

Committed patch by ULrich Arnold:

- Fixed reading PDFs with broken free object list in xref (either free
objects occuring more than once or non-continuous ranges of free objects
which can be found often in illustrator files)
 - PdfColor with Separation Colors can be converted to RGB
 - Fixed appending of documents: add free objects first to get no
overlapping object numbers
 - Optionally add prefix to XObject names (images are implemented here)
 - PdfVecObjects does not allow double insertion of a free object number
(safety check added)

As far as I can remember (my brain got 7 years older ;-) the adding of free
objects was moved from the back to the front of the function. I have not
found the mentioned function GetNextObject in the current source, might be a
typo.

Uli

-----Ursprüngliche Nachricht-----
On Wed, 2016-11-30 at 08:41 +0000, Dependahl, Hendrik wrote:
> I found an error in the call “PdfVecObject”
> affecting the use of PdfStreamed documents in combination with 
> XObjects.
> 
> ...
>  
> Inside the PdfVecObjects-the call must look like:
>  
> unsigned int difference = static_cast<unsigned
> int>(m_vecObjects.GetObjectCount())                             //__
> CORRECT
> ...

        Hi,
thanks for reporting the problem.

Particularly, you say that the bug is in PdfVecObjects, but your proposed
changes do not touch it. Also, it would be more convenient to provide
patches, then you'll not need to hardly describe the place where your
changes should be done and it also avoids other confusion.
Either you can generate them from a svn checkout, or use command like:

   $ diff -upr PoDoFo.orig/ PoDoFo.changed/ >podofo.patch

Then _attach_ the proposed patch to an email and send it to the list,
ideally keep threading (reply to this message).

Looking at the PdfDocument::Append(....), it looks like there is some idea
behind the current behaviour (I do not say it's correct), because a comment
right below the line you want to change says:

    // Ulrich Arnold 30.7.2009: Because GetNextObject uses m_nObjectCount
instead
    // of m_vecObjects.GetSize()+m_vecObjects.GetFreeObjects().size()+1
    // make sure the free objects are already present before appending to
    // prevent overlapping obj-numbers

from which I understand that your change also makes those following lines
useless. It needs some testing, though.
        Bye,
        zyx

-- 
http://www.litePDF.cz                                 i...@litepdf.cz




------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to