I am sending updated patch which covers also these two functions.
On Mon, Feb 17, 2020 at 11:41 PM Michal Sudolsky <sudols...@gmail.com> wrote: > Hi, > > There are also other "load" functions like LoadFromBuffer and > LoadFromDevice. Why are these not covered? > > On Thu, Feb 13, 2020 at 6:08 PM John Senneker <john.senne...@arup.com> > wrote: > >> Hello, >> >> The patch I sent you had a merge mistake, which caused the new >> bIgnoreBrokenObjects parameter not to be passed to the parser from >> PdfMemDocument in one of the variants of PdfMemDocument::Load(). The >> updated patch attached to this email has fixed this error. >> >> -- >> >> John Senneker >> >> >> >> *From:* John Senneker >> *Sent:* Monday, February 3, 2020 2:50 PM >> *To:* podofo-users@lists.sourceforge.net >> *Subject:* Patch for ignoring broken objects >> >> >> >> Hi, >> >> I submitted this patch a while ago, but didn’t get a response. In case it >> slipped through the cracks, I’ve pasted the text of the email below, and >> re-attached the patch file. >> >> >> >> An issue I’ve run into is full failure of parsing when objects are >> referred to that don’t exist. Often this is due to XRef stream entries that >> point to non-existent object streams or non-existent indices within those >> streams. This should be a recoverable error. >> >> >> >> There’s a bool member `m_bIgnoreBrokenObjects` in `PdfParser`, and that >> member is exposed through `SetIgnoreBrokenObjects()`, but it’s set to false >> in `Init()`, which is called by `Clear()`, which is called at the top of >> `ParseFile()`, so user-defined values are overwritten. Following the >> pattern used for the `m_bLoadOnDemand` flag, I’ve modified the >> `ParseFile()` functions to allow the user to pass in an optional >> `bIgnoreBrokenObjects` parameter (default false) to get around this issue. >> I’ve attached a patch to show what this looks like, and which also allows >> passing the `bIgnoreBrokenObjects` flag to `PdfMemDocument` constructors >> and `Load()` functions. It also checks the flag when reading objects from a >> stream. >> >> >> >> Is this the right way to go about this, or is there a better way to allow >> graceful failure and continuation of parsing? >> >> -- >> >> John Senneker >> ____________________________________________________________ >> Electronic mail messages entering and leaving Arup business systems are >> scanned for viruses and acceptability of content. >> _______________________________________________ >> Podofo-users mailing list >> Podofo-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/podofo-users >> >
PoDoFo-ignore-broken-objects_updated3.patch
Description: Binary data
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users