PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 8:09 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jan 04, 2024 3:58 pm 
Offline

Joined: Thu Jan 04, 2024 12:03 pm
Posts: 2
We are using PDFSharp 6.1.0-preview-1 on Docker with alphine linux when we create our PDF we use this code to create a font that will be used to write the page number on the page:

Code:
font = new XFont("Arial", fontSize, XFontStyleEx.Regular, embeddedFontOptions)


we also use this code for the resolver:

Code:
GlobalFontSettings.FontResolver = new FailsafeFontResolver();


We have Arial on the linux docker container, and was previously working untill the upgrade to PDFSharp 6.0 and PDFSharp 6.1.0-preview-1...

I can see this in the container terminal:

2024-01-04 16:51:19 info: PdfSharp.Snippets.Font.FailsafeFontResolver[0]
2024-01-04 16:51:19 'Arial' was substituted by a SegoeWP font.
2024-01-04 16:51:19 info: PdfSharp.Snippets.Font.FailsafeFontResolver[0]
2024-01-04 16:51:19 Get font for 'SegoeWP'.

But when I open the PDF in ADOBE viewer it seems the font is not embedded and is replaced incorrectly..

When running this on windows on my local machine it works, and the font Arial is found

See ADOBE dialog and font issue screenshots...

Please advise.


Attachments:
Screenshot 2024-01-04 175434.zip [18.01 KiB]
Downloaded 332 times
Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 08, 2024 9:12 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 916
Location: CCAA
dssmith wrote:
We have Arial on the linux docker container, and was previously working untill the upgrade to PDFSharp 6.0 and PDFSharp 6.1.0-preview-1...
And which older versions were working?

FailsafeFontResolver is not useful if you want to use Arial under Linux.
Better implement your own font resolver that uses the correct fonts.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 389 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