PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 10:00 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Dec 02, 2019 1:15 pm 
Offline

Joined: Mon Dec 02, 2019 12:53 pm
Posts: 3
Hi,

I have a .net standard library with PDFSharp.MigraDoc.Standard 1.51.9, and System.Drawing.Common 4.5.0. It works fine when using it from a Console App (.net Core). But when using it from a Xamarin Forms project, I receive the following exception (in Visual Studio 2017):

System.TypeLoadException: Could not load type of field 'PdfSharp.Drawing.XFont:_gdiFontFamily' (14) due to: Could not resolve type with token 0100004f from typeref (expected class 'System.Drawing.FontFamily' in assembly 'System.Drawing.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51') assembly:System.Drawing.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type:System.Drawing.FontFamily member:(null)

If I run the same project in Visual Studio 2019, I receive Platform Not Supported exception.

How can I make it work?

Thanks,
Haniela


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 02, 2019 2:19 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Hi!
HanielaH wrote:
I have a .net standard library with PDFSharp.MigraDoc.Standard 1.51.9
I suggest you ask the publishers of this derivative work for support.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 02, 2019 2:50 pm 
Offline

Joined: Mon Dec 02, 2019 12:53 pm
Posts: 3
Hi!

Thanks for your reply.
Yes, I tried that version because the official version is not supported in .net standard. It uses .net framework:

Package 'PDFsharp-MigraDoc 1.50.5147' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

Haniela


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 03, 2019 9:06 am 
Offline

Joined: Mon Dec 02, 2019 12:53 pm
Posts: 3
Hi,

May I ask: Do you have plans to make PDFSharp & MigraDoc support .net Standard and Xamarin in the (near) future?

Thank you,
Haniela


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 112 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group