We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Strange Font Problem When Doc To PDF

Thread ID:





124321 May 31,2016 05:17 PM UTC Aug 17,2017 12:22 PM UTC ASP.NET Web Forms (Classic) 5
Tags: DocIO
Asked On May 31, 2016 05:17 PM UTC

Updated on May 31, 2016 10:07 AM

I'm in a deep research to find a good word to pdf converter in c#.
I try to upload my word document to your online tool (DocToPDF) and try to convert it to PDF. But a strange font behavior occured, when I open PDF in an android device. My word document has a 3 lines of text in Verdana font. I emailed PDF to my email address and used Google Drive PDF Viewer to open PDF document. But some suqare characters occured on the viewer. I attached my docx file as attachment. What is the problem? If I change my font to Arial it works great. But I need to use Verdana....

Attachment: my_doc_cdef517d.rar

Vijay Ramachandran [Syncfusion]
Replied On June 1, 2016 10:15 AM UTC

Hi Emre,

Thank you for using Syncfusion product.

Currently DocIO doesn’t embed the fonts while converting Word document as PDF by default. For embedding the fonts, you need to pass parameter PDFConformanceLevel.Pdf_A1B while creating the PDFDocument object. We have also prepared the sample to embed the font while converting Word document as PDF. Please find the sample from the following link and let us know if it helps.

Also we have attached PDF file which is generated by using the above sample. Please find the output PDF file from following link:

Vijay R

Replied On June 1, 2016 08:45 PM UTC

Thank you,

I understand. Examples are enough for me. 
Why don't you support to embed fonts when converting from Word to PDF? 
Do you plan to add this functionality in the future?

Vijay Ramachandran [Syncfusion]
Replied On June 2, 2016 07:02 AM UTC

Hi Emre,

Thank you for your update.

Why don't you support to embed fonts when converting from Word to PDF? 
PDF file size will get increased While embedding the fonts by comparing with non-embedded documents. So that we are not embedding the fonts in the PDF file during Word to PDF conversion by default. 
Do you plan to add this functionality in the future? 
We will consider your requirement and will provide option in our Word to PDF online demo sample to set PDFConformanceLevel in any of our upcoming releases. 

Vijay R

Paul Steiner
Replied On August 16, 2017 11:29 AM UTC

I don't think that example works.

PdfDocument pdfDocument = new PdfDocument(PdfConformanceLevel.Pdf_A1B);

pdfDocument = converter.ConvertToPDF(wordDocument);

The pdf document created on the first line gets destroyed on the second line, because an new object is assignet. To pass the parameter is useless.

Vijay Ramachandran [Syncfusion]
Replied On August 17, 2017 12:22 PM UTC

Hi Paul,

Thank you for contacting Syncfusion support.

We have ensured our sample and it works fine, i.e. the generated PDF document conformance level is set as Pdf_A1B.

As per your illustration, we are creating new object(PdfDocument) while calling DocToPDFConverter.ConvertToPDF() method. We have internally maintained the PdfConformance level property as static, so that the conformance level property was not reset even though if we create new object during Word to PDF conversion.

Since the created PDF object is not used in Word to PDF conversion, we recommend you to use below code snippets to set the pdf conformance level.
            WordDocument document = new WordDocument(FileName);
DocToPDFConverter converter = new DocToPDFConverter();
//Set the PDF Conformance level.
            converter.Settings.PdfConformanceLevel = PdfConformanceLevel.Pdf_A1B;
PdfDocument pdf = converter.ConvertToPDF(document);

Please let us know if you have any questions.

Vijay R


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon