PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Jul 18, 2024 11:30 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Jul 10, 2015 10:00 am 
Offline

Joined: Fri Jul 10, 2015 9:11 am
Posts: 2
I'm trying to use PDFSharp and MigraDoc within a Mono project on OS X. Using the Core PDF version 1.50 beta available through NuGet (3638), I'm able to set a custom FontResolver (as per Alex's page at http://www.alex-maz.info/pdfsharp_150 ) and it totally works but..

There's an issue with Mono on OS X when using any methods which initialise GDI+ - it causes the font cache to be updated which can lead to a delay of seconds to minutes before execution resumes. This is something that has caused us issues in the past, on some Mac systems this wait is significant and we need a way to avoid this happening(!)

The GDI+ initialisation issue triggered using the Core PDF verions 1.50 (and using a custom FontResolver), which appears to suggest somewhere in PDFSharp or MigraDoc there is some use of GDI+ methods. I could be completely wrong, it might be to do with opening TTF fonts, so I tried replacing the TTF font with OTF ones but they didn't load.

If the source code for 1.50 is available it would really help resolve this issue, unless you have any ideas on how to stop *any* GDI+ initialisation happening?

Keep up the great work guys! :)

Many Thanks,
Dave


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 10, 2015 10:57 am 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 343
We use PDFsharp 1.50 in our Silverlight applications and have no problems (I assume one cannot use GDI+ under Silverlight).

I cannot say when the source code for version 1.50 will be publicly available.

Does the problem already occur with a simple Hello World program?
If not, add more features (e.g. JPEG images, non-JPEG images, ...) until you know what invokes GDI+.

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 10, 2015 11:31 am 
Offline

Joined: Fri Jul 10, 2015 9:11 am
Posts: 2
Thanks Öhmesh,

It is a puzzling one, there's some interaction with Mono or MacOSX I suspect and it seems to be something inside migradoc rather than pdfsharp, I've been able to create PDF document with some text in (loading the font correctly) without issues now.

The gdi+ / font cache initialisation slowdown happens as a result of a call to MigraDoc.PdfDocumentRenderer

Thanks,
Dave


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 42 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