PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Apr 20, 2018 6:24 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Apr 16, 2018 8:37 am 
Offline

Joined: Mon Apr 16, 2018 8:25 am
Posts: 4
Hello,

new PDFSharp user here, very powerful tool but struggling with a problem on font names.

When trying to embed Times New Roman, the font name referenced in the PDF is somehow transformed in "Times#20New#20Roman" and Adobe applications complain about not being able to find the font when loading the PDF (tried on Illustrator and InDesign).

Is it something known (possibly some glaring oversight since I cannot believe this is not happening to somebody else)?

Using Windows (10) with Adobe CC applications and PDFSharp 1.50.4845-RC2a.

Thank you very much in advance.

Best regards,
Mario


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 16, 2018 10:03 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2807
Location: Cologne, Germany
Hi!

I'd expect the font name in the PDF to start with "TimesNewRoman".

Nothing we will do without an MCVE aka IssueSubmissionTemplate.
viewtopic.php?f=2&t=832

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 16, 2018 10:11 am 
Offline

Joined: Mon Apr 16, 2018 8:25 am
Posts: 4
Hello, thanks for the prompt reply.

I opened the PDF file with a text editor and I see a lot of those:

/BaseFont/QDAHJM+Times#20New#20Roman
/FontName/QDAHJM+Times#20New#20Roman

We tried with a different library, same system, same fonts, and there's no problem with the resulting PDF.

Thanks!

- Mario


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 16, 2018 10:22 am 
Offline

Joined: Mon Apr 16, 2018 8:25 am
Posts: 4
(Zipped) PDF file attached, preparing a stripped down example in Visual Studio that exhibits the issue.

- Mario


Attachments:
C22D2D77-7CD7-4920-9970-0CFCEDB2DE6C_tempfile.zip [91.53 KiB]
Downloaded 2 times
Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 16, 2018 10:49 am 
Offline

Joined: Mon Apr 16, 2018 8:25 am
Posts: 4
Also attached an MCVE, Visual Studio solution.

Thanks,
Mario


Attachments:
SVGtoPDFPoC.zip [158.01 KiB]
Downloaded 3 times
Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 16, 2018 9:12 pm 
Offline
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 355
Location: CCAA
Hi!

I thought I knew PDFsharp, but turns out I do not.

Until PDFsharp 1.50 beta 2 there were no spaces.
With PDFsharp 1.50 beta 3 and later there are spaces.

In the PDF Reference I found no information whether spaces are allowed or forbidden.
Adobe Reader does not complain. And the spaces "#20" persist when I use "Save as" in Adobe Reader DC, so it looks as if spaces are OK for PDF - just not OK for older Adobe tools it seems.

A PDF created from Word shows "TimesNewRoman" without spaces.

I'll investigate this a bit further, but not tonight.
It could be better to use fontnames without spaces like early versions did.

_________________
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  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider] and 14 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:  
Powered by phpBB® Forum Software © phpBB Group