Hi,
There is missing this part of original patch:
@@ -1304,7 +1306,15 @@
std::ostringstream oss;
oss << "Loading of object " << nObjNo << " 0 R failed!" << std::endl;
- PODOFO_RAISE_ERROR_INFO( ePdfError_NoObject, oss.str().c_str() );
+ if ( m_bIgnoreBrokenObjects )
+ {
+ PdfError::LogMessage( eLogSeverity_Error, oss.str().c_str() );
+ return;
+ }
+ else
+ {
+ PODOFO_RAISE_ERROR_INFO( ePdfError_NoObject, oss.str().c_str() );
+ }
}
On Thu, Feb 27, 2020 at 7:38 PM John Senneker <[email protected]>
wrote:
> Hi zyx,
> Here's a patch that:
> * makes PdfParser::m_bIgnoreBrokenObjects a static member, which can be
> changed by calling the existing setter and getter methods (which are now
> static).
> * removes the code in PdfParser::Init() that set m_bIgnoreBrokenObjects to
> false
> * makes the default for the new static member true
>
> The new patch makes no changes to things other than PdfParser. So the API
> for people who don't want to ignore broken objects would be to call
> PdfParser::SetIgnoreBrokenObjects() before calling PdfMemDocument::Load(),
> or whatever else they're doing.
>
> I think this is what you and Michal were suggesting, but if I've
> misunderstood please let me know!
> --
> JS
>
> -----Original Message-----
> From: zyx <[email protected]>
> Sent: Thursday, February 27, 2020 1:55 AM
> To: podofo-users <[email protected]>
> Cc: John Senneker <[email protected]>
> Subject: Re: [Podofo-users] [External] Re: Patch for ignoring broken
> objects
>
> On Wed, 2020-02-26 at 19:32 +0100, Michal Sudolsky wrote:
> > Unless someone really needs to use different settings in different
> > threads for some reason (now or in future).
>
> Hi,
> I agree and I'd say it'll be a minority of the users, if any. Let's try
> with the simplest method, with the static variable (and methods to get/set
> the value) in PdfParser.
>
> John, would you mind to update your patch in this regard, please? I'd like
> to give you the credits for the change, as it is your initiative, thus it
> deserves it. Check the recent messages in this thread for the suggested
> changes.
>
> Thanks and bye,
> zyx
>
> ____________________________________________________________
> Electronic mail messages entering and leaving Arup business systems are
> scanned for viruses and acceptability of content.
> _______________________________________________
> Podofo-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/podofo-users
>
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users