PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 02, 2024 9:20 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Wed May 05, 2010 2:16 pm 
Offline

Joined: Thu Apr 22, 2010 10:25 am
Posts: 14
Hi, I was having issues with WPF on our live server so I moved to the GDI build and all seemed well.

Since moving to GDI I have noticed that setting my required font is not working. The following code worked fine in the WPF build:
Code:
        para.Format.Font.Color = Color.FromCmyk(4, 94, 90, 1)
        para.Format.Font.Size = 15
        para.Format.Font.Bold = False
        para.Format.Font.Name = "FS Albert Bold"


If i change the font to a standard font (ie verdana) it works ok, it just seems to be this custom font.

Can you suggest anything?

Kind regards


Top
 Profile  
Reply with quote  
PostPosted: Wed May 05, 2010 2:34 pm 
Offline
PDFsharp Guru
User avatar

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

If the font is in a PrivateFontCollection: don't use PrivateFontCollection, install the font locally on your server.

IIRC PrivateFontCollection work with the GDI build of PDFsharp 1.1 and with the WPF builds of PDFsharp 1.2/1.3.
Therefore switching to an older version could solve this problem.
This bug shall be fixed with the next release. Sorry for the inconvenience.

If it fails with the font installed locally on the server: could be a rights problem.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed May 05, 2010 2:42 pm 
Offline

Joined: Thu Apr 22, 2010 10:25 am
Posts: 14
Thank you for the quick response.

The font is installed on the server - where can I get an older version of the build?

If it's a rights issue, where can I rectify this - as I mentioned, it loaded the font in fine in the WPF build.

Regards


Top
 Profile  
Reply with quote  
PostPosted: Wed May 05, 2010 2:56 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
If you don't use PrivateFontCollections there's no need to go back to an old version.
(But all versions are still there: https://sourceforge.net/projects/pdfsharp/files/ )

I presume it runs on a web server?
Every web application belongs to an application pool that gets its rights from an identity.
For a try you can create a new application pool running on the Local System account for your application.
It's probably not a rights problem if it still fails then.

Maybe the font must be converted for use with our GDI build:
http://www.pdfsharp.net/wiki/PostScript_fonts.ashx

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed May 05, 2010 3:09 pm 
Offline

Joined: Thu Apr 22, 2010 10:25 am
Posts: 14
Hi,

Thanks again - Unfortunately this did not resolve the issue. The font has also be converted to openType (I have attached the font).

Any other suggestions would be greatly appreciated.

Kind regards


Admin sez: attachment removed ...


Top
 Profile  
Reply with quote  
PostPosted: Wed May 05, 2010 3:15 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
OpenType is a container for PostScript and True Type fonts.

Only True Type fonts will work with the GDI build. You have PostScript fonts.
See here:
http://www.pdfsharp.net/wiki/PostScript_fonts.ashx

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed May 05, 2010 3:45 pm 
Offline

Joined: Thu Apr 22, 2010 10:25 am
Posts: 14
Hey,

Sorry to be a pain - I have converted now to TTF and still no joy.

Attached is the TTF version - Any thoughts?


Attachments:
FSALBEEB.zip [49.48 KiB]
Downloaded 513 times
Top
 Profile  
Reply with quote  
PostPosted: Wed May 05, 2010 3:46 pm 
Offline

Joined: Thu Apr 22, 2010 10:25 am
Posts: 14
..

I'm not sure if this is helpful, bit if I change the font to Wingdings, it works, and it looks like wingdings is an opentype?

Regards


Top
 Profile  
Reply with quote  
PostPosted: Wed May 05, 2010 5:16 pm 
Offline

Joined: Thu Apr 22, 2010 10:25 am
Posts: 14
I am not sure if this is going to be possible - I have converted the font to TTF using multiple converters and still no joy.

The font works fine if I go back to WPF build but I cannot run this in the server 2003 live environment.

Do you know how I can resolve this.

I have a large client awaiting delivery and this is the final piece in a huge project - I am to make a donation if we can get this fully resolved.

Regards


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2010 11:06 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
foxwoodDesign wrote:
I'm not sure if this is helpful, bit if I change the font to Wingdings, it works, and it looks like wingdings is an opentype?

There are OpenType files with True Type outlines (like Wingdings) that do work - and there are OpenType files with PostScript outlines (like your Albert font) that do not work.

Your converted font appears to be True Type and should work.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 47 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group