Hello all,

> lamere palermo <lamerepale...@gmail.com> wrote 22 March 2017 at 23:04:
> 
> 
> Hi,
> 
> I have encountered issues while trying to read a badly formated PDF. 
> This PDF is generated by a third party that I must support, so I cannot 
> ignore the problem.
> 
> After some investigations, it seems the xref table is not ended by two 
> end of line characters but only one. Because of that, the 
> ReadXRefSubsection API doesn't behave correctly and wrong IDs are read.
> 
> To avoid such an issue, I have added a workaround. The idea is to read 
> only until the last eol character. Here is the diff :
> 
> 789,795d788
> <         for(int i = PDF_XREF_ENTRY_SIZE - 1; i > 0; i--){
> <             if((m_buffer.GetBuffer()[i] == 10 || m_buffer.GetBuffer()[i] == 
> 13) &&
> <                 i != PDF_XREF_ENTRY_SIZE - 1){
> < m_device.Device()->Seek(-(PDF_XREF_ENTRY_SIZE - 1 - i), std::ios_base::cur);
> <             }
> <         }
> <
> 
> This patch fixes my issue. I hope this will help other persons having 
> the same problem.

the patch looks like it removes something, however I haven't found it in PoDoFo.
Is the patch reversed? What svn revision was it generated against?
Without context it's hard see what's really meant. Could you please regenerate
the patch in unified format (3 lines of context)?

I hope this patch doesn't go ignored for the release candidate (11 Feb 2018?).
> 
> Regards,

Best regards, mabri

------------------------------------------------------------------------------
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