Forum Bugs

Issues with embedding Fonts

Ives Laaf
Hi there,

i'm stuck since some days with the following situation:

1. I've a xhtml-site, that gets processed by prince xml - triggered from within some c# code through the prince.dll wrapper.
2. The to be converted file get's accessed through an url
3. If I call the engine from the cmd line everything works, all fonts are used and included within the pdf as expected
4. If I call the engine from the code via stream to stream method, one font doesn't get used.
5. Logging doesn't show much, as I can't set it to be verbose, but shows no error neither.
6. As far as I can see, I can't set logging to be verbose.
7. All done on the very same system.
8. The Font which doesn't work, when called from code, has been installed later on to the system, so no default system font.

So any hints? Beside rewriting Prince.DLL to enable verbose logging to get an idea whats going on?
Looking forward to some ideas from your site.
Thanks a lot.

Kind Regards,
Ives


Call from CMD-Line
C:\Program Files\Prince\Engine\bin>prince -o c:\test.pdf http://someurl/DE/showpage.aspx?pageid=12 -v
prince: Loading document...
prince: loading document: http://someurl/DE/showpage.aspx?pageid=12
prince: loading HTML input: http://someurl/DE/showpage.aspx?pageid=12
prince: loading document: http://someurl/DE/showpage.aspx?pageid=12
prince: loading style sheet: http://someurl/DE/Css/print.css
prince: loading image: http://someurl/Images/logos/Logo_DekaNews_Print.jpg
prince: loading image: http://someurl/Images/logos/Logo_DekaBank_Print.jpg
prince: Converting document...
prince: used font: Arial, Bold
prince: used font: Arial, Regular
prince: used font: DekaFrutiger 45 Light, Bold
prince: Finished: success
=> everything as expected

Logoutput from the codebased call when setLog is used:
Wed Apr 7 00:51:07 2010: ---- begin
Wed Apr 7 00:51:07 2010: Loading document...
Wed Apr 7 00:51:07 2010: Converting document...
Wed Apr 7 00:51:07 2010: finished: success
Wed Apr 7 00:51:07 2010: ---- end
=> DekaFrutiger 45 Light, Bold does not get used for some reason
mikeday
8. The Font which doesn't work, when called from code, has been installed later on to the system, so no default system font.

What does this mean exactly? Is the font available as a system font, or are you referring to it as a file using an @font-face rule?
Ives Laaf
It's installed as a system font. And as mentioned above when the very same URL (XHTML Document, same CSS) is called via cmd-line everything works, if the engine is used from within c#-based .net via prince.dll it does not use this font. But since the logging isn't verbose and --silent get's added by prince.dll there isn't much output in the logfile and there seem to be no obvious error condition as nothing like an error shows up within the logfile...

@font-face rule i may test too - but the idea was i won't have to do it and i don't understand the issue why the 'embedded' version doesn't work. Even the GUI works as expected with local file only the embedded version breakes which is really strange but i don't get it.
mikeday
That is very strange, we have not encountered this issue before. What kind of font is it, TTF or OTF? What version of Windows are you running Prince on? Perhaps we may need to modify the .NET wrapper to include the --debug flag.
Ives Laaf
It's a True Type font. I can't post it in the forum but for testing purposes I may be able to send it to you directly. Eventually I can construct a mini-example or give you an URL with such an example for testing, but I can only provide that in the late evening i think.
mikeday
I would assume there is nothing wrong with the font if it can be used successfully from the command-line and the GUI, but it's a strange situation, so who knows. My email is mikeday@yeslogic.com, when you have further details for testing.