We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Fonts are not matching after downloading the same document in word and pdf

Hello,


We are using licensed ASPOSE APIs in our application. We are facing some issues regarding fonts in .doc and .pdf.

A document generated in .pdf differs by the format from the same document in .doc. Fonts are not matching after downloading the same document in .doc and .pdf.

When we check the win word, the font is ‘Univers 57 and Univers 47’ , PDF font is generated with Univers-condensed and other fonts also. Please find the test results below.

Sr. No

Winword - Font

PDF - Font

Same Font (Yes / No)

1

Kaiki

TimesNewRomanPS

No

2

Arial

Arial

Yes

3

Univers 57 Condensed

Arial-BoldMT,
CouriesNewPSMT,
Univers-Condensed

Partially Yes.

4

Univers 47 CondensedLight

SymbolMT,
TimesNewRomanPS,
Univers-Condensed

Partially Yes.

5

Courier New

Courier New

Yes

6

Times New Roman

Times New Roman

Yes

7

Verdana

Verdana

Yes


To find the root cause, we installed required fonts (Univers 57 Condensed,Univers 47 CondensedLight and so on..) in local PC and tested. Then,Its working. The concern here is that we can not say to the users to install the required fonts who is using this application. Can you please provide the proper solution to avoid installation of fonts by the users to overcome font related issue in .doc and .pdf format for the same document.

Regards,
Harikrishna.

Hi Harikrishna,

Can you please share your input Word document to reproduce the issue? Please also share the environment details e.g. Operating System and development platform (.NET or Java) etc.

Best Regards,

Hello,


Please create the word document with “Univers 57 Condensed” / “Univers 47 CondensedLight” fonts and use this word document to generate the PDF document and check whether created PDF has exact font (“Univers 57 Condensed” / “Univers 47 CondensedLight”) or not as word document.

Currently, I have Windows 7 Enterprise in my system. I have .NET development environment.

Regards,
Harikrishna.

Hello,


Please create the word document with “Univers 57 Condensed” / “Univers 47 CondensedLight” fonts and use this word document to generate the PDF document and check whether created PDF has exact font (“Univers 57 Condensed” / “Univers 47 CondensedLight”) or not as word document.

For your reference, please find the attachment of word document with “Univers 57 Condensed” font. Please generate PDF with attached word document.

Regards,
Harikrishna.

Hi Harikrishna,

Fonts need to be installed when you convert the documents to fixed page formats including PDF. Please check http://www.aspose.com/docs/display/wordsnet/Rendering+and+Printing for more details. If your application is deployed on a server, you should install required fonts on server only but if you have distributed your application and users have installed your application on their machines, fonts need to be installed on the machines running your application.

If you do not want users to install fonts, you can embed fonts in the documents as a workaround.

Best Regards,

Hello,


As you suggested, I have embedded fonts in template using http://www.howtogeek.com/106681/how-to-embed-fonts-in-a-microsoft-word-document/. I have used this template to generate the PDF, but still exact font is not displaying in generated PDF file. For your reference, please find the attachment.

Regards,
Harikrishna.

Hi Harikrishna,

Can you please also share the font and document with fonts embedded?

Best Regards,

Hello,


Please find the attachment.

Regards,
Harikrishna.

Hi Harikrishna,

If you convert the same document using MS Word, you will see the font changed in that output as well. Can you please share the font file (Univers 57 and Univers 47’)? This will help us in further analyzing the issue.

Best Regards,

Hello,


Please find the template having the data with Univers 57 Condensed font. Please use this template to generate PDF and DOCX and check whether these two documents have exact font or not. If not match with exact font, please suggest proper solution.

Regards,
Harikrishna.

Hi Harikrishna,

You have already shared the template with embedded fonts however we need font file (.otf or .ttf) for further analysis because MS Word is also not using the embedded font and replacing this font with other fonts.

Best Regards,

Hello,


I tried to attach ttf file as file attachment. But its not allowing the attachment.

Please download free font “univers_57_condensed” from https://www.google.co.in/?gws_rd=ssl#q=free+download+univers+57+condensedand check.

Regards,
Harikrishna.

Hi Harikrishna,

I get the correct output at my end when I convert Word document with this font to PDF. I have attached your sample file after embedding 'univers 57 condensed' font. I get the attached output when I convert this file to PDF.

Please try to convert attached file at your end and let us know if you see any issue. Please also note that this font should be installed on the system where you are embedding the fonts otherwise alternate font will be embedded.

Best Regards,

Hello,<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>

Thanks for your reply. This approach did not work for us. I
already tried this approach 1 week back itself.<o:p></o:p>

Steps followed to perform the task:<o:p></o:p>

1.
Placed the font “univers_57_condensed” in “C:\Windows\Fonts” and prepared the word
template using this font<o:p></o:p>

2.
Embedded
the font as you suggested<o:p></o:p>

3.
Remove the “univers_57_condensed” from “C:\Windows\Fonts” after generated the word
template
<o:p></o:p>

4.
Generated
the PDF using word template
<o:p></o:p>

5.
Same (univers_57_condensed)
font did not display in generated PDF
<o:p></o:p>

Can you please try above steps and confirm.<o:p></o:p>

Regards,<o:p></o:p>

Harikrishna.

Hello,

Please find the font in zip format.

Regards,

Harikrishna.

Hi Harikrishna,

I had followed the same steps on Windows 7 with MS Word 2010 and generated Word file was attached with my previous post. Have you tried to convert the file attached to my previous post?

I followed the same steps again and result was same. Did not notice any issue with the output. Can you please share which version of MS Word you used (in case that makes any difference)?

Best Regards,

Hello,

Thanks for your reply.

Client is using below 4 fonts while generating PDF file using word template which is having below fonts . Out of 4 fonts, "Univers_57_condensed" font only is partially working when we embed the font in word document. Remaning 3 fonts are not working. Please do the needful.

  1. Univers 47 CondensedLight
  2. Univers Condensed Light
  3. Univers LT Std 47 Condensed
  4. LightUnivers_57_condensed

Regards,

Harikrishna.

Hello,

Thanks for your reply.

Client is using below 4 fonts while generating PDF file using word template which is having below fonts . Out of 4 fonts, "Univers_57_condensed" font only is partially working when we embed the font in word document. Remaning 3 fonts are not working. Please do the needful.

  1. Univers 47 CondensedLight
  2. Univers Condensed Light
  3. Univers LT Std 47 Condensed Light
  4. Univers_57_condensed

Regards,

Harikrishna.

Hello,

Fonts which are having file type as .ttf are working partially. Remaining file types (e.g. otf file type) are not working. Please suggest on this.

Regards,

Harikrishna.

Hi Harikrishna,

Sorry, I was still not able to see the issue. I get the same output with MS Word and Aspose.Words so Aspose.Words mimics the behavior of MS Word. I get the attached output for a simple document at my end.

If I uninstall these fonts after embedding in the document, MS Word replaces these fonts with some other fonts and then embeds the replaced fonts. Same is the case with Aspose.Words. If we keep these fonts installed until the conversion is done, then there is no issue whether we use MS Word or Aspose.Words.

Best Regards,