ststeiger / PdfSharpCore

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

UnfilteredValue only returns an error text for FlateDecode image #315

Open husaft opened 1 year ago

husaft commented 1 year ago

Hi, I'm using PdfSharpCore v1.3.43 in NET 6 from NuGet, and it is just great. Thank you very much.

But now I encountered an image embedded in one of my test files ( pdf ) which is zipped with a FlateDecode filter and the property UnfilteredValue in PdfSharpCore.Pdf.PdfDictionary just returns an error message (37 bytes, "Can't decode /FlateDecode").

As I wondered about this, I've found it is a regression compared to "PDFsharp" v1.32.3057, I tried and read it myself from dictionary.Stream.Value again ... and it works ( here ).

Maybe there is a bug in the deflate filter? At least, compared to the classic System.Drawing legacy.