Welcome Guest Search | Active Topics | Sign In | Register

Font is displayed incorrectly in PDF generated on server Options
Aidin
Posted: Wednesday, July 22, 2015 9:23:27 AM
Rank: Newbie
Groups: Member

Joined: 7/22/2015
Posts: 2
Locally (Windows 7 machine) when a PDF is generated from the website, text with the
font: “Myriad-Italic” is displayed correctly in the generated PDF.

When we try the same on the server: windows Server 2012R2, the text that should have the font “Myriad-Italic” is displayed incorrectly.

When you copy the incorrectly displayed text from the pdf and paste it in Microsoft Word or WordPad the pasted text is displayed correctly and in the font dropdown box it shows “Myriad-Italic”. This tells me that it is not falling back on a different font.

I’ve emailed you a zip with the generated PDF files, the test project with source code, the fonts and our license.

Your help is much appreciated.

Many thanks,
eo_support
Posted: Thursday, July 23, 2015 5:07:41 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Thanks for posting in the forum. Please make sure the font is indeed installed on your server. When EO.Pdf renders your HTML, it will ask Windows for the raw font data and embed that font data in the PDF file (this way the PDF file will be rendered correctly on a system without that font). However if this font does not exist on the server, then Windows will return the raw font data of the substituted font. In that case the PDF file will contain the real font name, but the substituted font data. This is why when you copy it over to Word it still carries the correct font data. However the PDF file relies on font data in the file, not on the client computer. So even if the font is installed on the client computer, it won't render correctly. It's whether the font is installed correctly on your server that matters.

If the font is indeed installed on your server, then there must be something related to permission that prevents the converter from using the font. In that case the easiest way is to use @font-face CSS directive to load the font file directly. That will bypass Windows and instructs the converter to read the font data directly from the font file. That should resolve the issue for you.

Please let us know if you still have any more questions.

Thanks!
Aidin
Posted: Wednesday, July 29, 2015 12:32:33 PM
Rank: Newbie
Groups: Member

Joined: 7/22/2015
Posts: 2
Hi,

Thank you for your response. You mention:
“It's whether the font is installed correctly on your server that matters.”

When on the server I open Microsoft WordPad, I copy the text with the font Myriad-Italic Font from the generated pdf into it, the text is displayed correctly in WordPad. This tells me that the font is correctly installed on the server.

The @font-face CSS directive to load the font file directly is an excellent work around that I’ve got now working.

When you take a look at the pdf's that I sent you earlier. When you look at the shading of the buttons, the button in the pdf created on the server has a different shading than the one created locally. What could be affecting the difference in rendering?

eo_support
Posted: Wednesday, July 29, 2015 8:40:45 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

The font issue might be related to permissions. I am glad to hear that @font-face works for you.

The shading might be related to CSS, for example, CSS path is not correct on the server so it can not load the CSS file. You can try to find out what creates the shading effect and put that directly in your HTML and see if it works.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.