ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.06k stars 239 forks source link

Handle empty object parsing #439

Closed NicolaDemers closed 2 months ago

NicolaDemers commented 5 months ago

When parsing, there is no handling of empty objects. For example:

13 0 obj
endobj

This PR aims to return a null object when parsing an empty one instead of throwing "Unexpected token 'endobj' in PDF stream. The file may be corrupted. If you think this is a bug in PDFsharp, please send us your PDF file.".

ststeiger commented 2 months ago

Merged.