PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

System.Drawing.Common is not supported.
http://forum.pdfsharp.com/viewtopic.php?f=2&t=4349
Page 1 of 1

Author:  dziulev [ Thu Jul 07, 2022 11:37 am ]
Post subject:  System.Drawing.Common is not supported.

I am using .NET 6 app which is hosting in docker linux.
When I run PdfSharp.Drawing.FontHelper.CreateFont then I get error

The type initializer for 'Gdip' threw an exception. System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
Breaking change: System.Drawing.Common only supported on Windows - .NET
Learn about the .NET 6 breaking change where the System.Drawing.Common package is no longer support on non-Windows operating systems.

Is there any way to use System.Drawing.Common is linux-based container?
Maybe someone has a solution to this problem?

Author:  () => true [ Thu Jul 07, 2022 2:32 pm ]
Post subject:  Re: System.Drawing.Common is not supported.

There is not official build of PDFsharp for .NET 6 yet.
There are third-party ports you can use.

Author:  dziulev [ Thu Jul 07, 2022 4:15 pm ]
Post subject:  Re: System.Drawing.Common is not supported.

() => true wrote:
There are third-party ports you can use.


Could you write what are the third-party ports, please?

Author:  () => true [ Fri Jul 08, 2022 10:30 am ]
Post subject:  Re: System.Drawing.Common is not supported.

dziulev wrote:
Could you write what are the third-party ports, please?
I could google them for you, but since I haven't tried any of them, there is no library I can really recommend.
Expect some differences with image handling or font handling between the official library and the third-party ports.

Author:  mikkeljohnsen [ Fri Jul 29, 2022 8:29 am ]
Post subject:  Re: System.Drawing.Common is not supported.

I have made a pull request here: https://github.com/CLMSUK/PDFsharp/pull/1

It replaces System.Drawing.Common with Image processing from SixLabors. It is not perfect

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/