HTML-Renderer icon indicating copy to clipboard operation
HTML-Renderer copied to clipboard

"Obsolete and not implemted any more." exception with PdfGenerator.ParseStylesheet method

Open lavanyadeepak opened this issue 5 years ago • 2 comments

I have this line of code in my application

Line 268: var cssData = PdfGenerator.ParseStyleSheet(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Content/bootstrap.min.css"));

and I am getting an exception

image

I would like to enclose the version details of individual assemblies below.

image

image

image

image

lavanyadeepak avatar Nov 19 '20 07:11 lavanyadeepak

I ran into this too today. My digging found that the NuGet package PdfSharp was updated from 1.32.3057 (released 2013-05-16) to 1.50.5147 (released 2019-02-04), and in this new version there's some methods now throwing InvalidOperationException("Obsolete and not implemted any more."). For example, https://github.com/empira/PDFsharp/blob/1.50-stable/src/PdfSharp/Drawing/XFontFamily.cs line 278.

To get rid of this error, you can downgrade PdfSharp. It would be nice if this project could either indicate it doesn't support later versions of PdfSharp, or was updated to use the latest.

JensCarlbergLiU avatar May 23 '22 11:05 JensCarlbergLiU

I guess there is no chance of this being fixed and a new update for the NuGet pakket being released?

Deantwo avatar Feb 03 '23 12:02 Deantwo