Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu May 16, 2013 10:07 am

Hello,

I load a Word document which has an embedded font and try to save it as PDF. PDF wont recognize the font and will replace it with a standard font. I tried to avoid that and to use the save option like it follows:

Code: Select all
            Dim paramlist As New ToPdfParameterList
            paramlist.EmbeddedFontNameList.Add("Berling Antiqua")
            paramlist.EmbeddedFontNameList.Add("Frutiger BSK")
            paramlist.EmbeddedFontNameList.Add("Frutiger Linotype")
            spireDocument.SaveToFile("C:\temp\a.pdf", paramlist)


No effect. Could you please suggest me a better solution to keep embedded fonts when saved to a pdf-format?
thank you.

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Fri May 17, 2013 6:52 am

Hello,

Thanks for your inquiry.

Could you please confirm if the embeded font file has been install in your develop computer? If not, you need to download and install it, and then use the save option like what you did follows:
Code: Select all
Dim paramlist As New ToPdfParameterList
paramlist.EmbeddedFontNameList.Add("Berling Antiqua")
paramlist.EmbeddedFontNameList.Add("Frutiger BSK")
paramlist.EmbeddedFontNameList.Add("Frutiger Linotype")
spireDocument.SaveToFile("C:\temp\a.pdf", paramlist)

Because the ToPdfParameterList() requests that there are the embeded fonts exist in the develop computer, then it could embed the fonts to the PDF correctly. Although there are no embeded fonts in other computers, the PDF would recognize the embeded fonts.

If there are any questions, welcome to get it back to us.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue May 21, 2013 11:06 am

Dear catalin,

Has this issue been solved?
Please give us a feedback message at your early convenience.
There is any issue, please feel free to contact us.

Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Tue May 28, 2013 7:34 am

Gary.zhang wrote:Hello,

Thanks for your inquiry.

Could you please confirm if the embeded font file has been install in your develop computer? If not, you need to download and install it, and then use the save option like what you did follows:
Code: Select all
Dim paramlist As New ToPdfParameterList
paramlist.EmbeddedFontNameList.Add("Berling Antiqua")
paramlist.EmbeddedFontNameList.Add("Frutiger BSK")
paramlist.EmbeddedFontNameList.Add("Frutiger Linotype")
spireDocument.SaveToFile("C:\temp\a.pdf", paramlist)

Because the ToPdfParameterList() requests that there are the embeded fonts exist in the develop computer, then it could embed the fonts to the PDF correctly. Although there are no embeded fonts in other computers, the PDF would recognize the embeded fonts.

If there are any questions, welcome to get it back to us.

Thanks,
Gary
E-iceblue support team

Yes, the fonts are installed on the develop computer, but not embedded in the final PDF Document. Can you send me a working code sample? Thanks.

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Tue May 28, 2013 8:26 am

Hello,

Thanks for your feedback.

We had tested with the Spire.Doc version 4.8.2(http://www.e-iceblue.com/Download/download-word-for-net-now/spiredoc-pack-hot-fix-4-8-2.html?Itemid=0) before, it worked fine, and the fonts are embedded in the final PDF Document, the test code is as below. The test word document and the pdf document are attached.

Code: Select all
 
Dim document As New Document
document.LoadFromFile("fonttest.docx")
Dim paramlist As New ToPdfParameterList
paramlist.EmbeddedFontNameList.Add("Berling Antiqua")
paramlist.EmbeddedFontNameList.Add("Frutiger Linotype")
document.SaveToFile("fonttest.pdf", paramlist)


If you still have the issue, please provide us your word document and pdf document.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu May 30, 2013 9:58 am

Hello,

Has the issue been resolved? Could you please update the thread if convenience?

If there are any questions, welcome to get it back to us.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Jun 13, 2013 6:07 am

Yes, it worked, thank you very much.

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Return to Spire.Doc