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

Unreadable fonts in browser when converting DOCX to PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

141081 Nov 22,2018 02:56 PM UTC Dec 18,2018 05:46 PM UTC ASP.NET Core - EJ 2 3
loading
Tags: DocIO
Federico Dipuma
Asked On November 22, 2018 02:58 PM UTC

I'm currently experiencing a strange issue when converting a docx file, which uses different fonts, into pdf using DocIORenderer.

I'm loading the docx file into a WordDocument, and then converting it with

using (var renderer = new DocIORenderer())
using (var file = File.OpenWrite("c:\test\converted.pdf"))
{
    PdfDocument pdf = renderer.ConvertToPDF(Document);
    pdf.Save(file);
}

When viewed inside Acrobat Reader, the document is rendered correctly (see attached image "acrobat.png").

When the same pdf is viewed inside Chrome (version 70.0.3538.102) or Firefox (version 60.0.3) fonts are not even readable, and rendered totally wrong (see attached images "chrome.png" and "firefox.png").

This behavior truly limits fonts used inside pdf.

I've also attached both the pdf and the original docx file used for the tests.



Attachment: pdf_issue_c0d78dc4.zip

Dilli Babu Nandha Gopal [Syncfusion]
Replied On November 23, 2018 07:06 AM UTC

Hi Federico, 

Greetings from Syncfusion. 

We can reproduce the reported issue from our side. This issue has been fixed recently and the issue fix will be included in our upcoming main release 2018 Volume 4. The release is estimated to be rolled out by December 2018 and we will let you know once it is released. So, we recommend you to upgrade to 2018 Volume 4 Essential version which will resolve this issue. 

Regards, 
Dilli babu. 


Federico Dipuma
Replied On December 14, 2018 03:20 PM UTC

Hi Federico, 

Greetings from Syncfusion. 

We can reproduce the reported issue from our side. This issue has been fixed recently and the issue fix will be included in our upcoming main release 2018 Volume 4. The release is estimated to be rolled out by December 2018 and we will let you know once it is released. So, we recommend you to upgrade to 2018 Volume 4 Essential version which will resolve this issue. 

Regards, 
Dilli babu. 


Hi Dilli babu,
I ran a few tests using the version 16.4.0.40-beta (which is already available on nuget), but I've still got problems in viewing PDF files in operating systems other than Windows.

Fonts rendering is wrong on Mac or Linux (which includes android), as you can see in attachment.

Will this issue be resolved with the final release? This is very problematic for many of our customers not using Windows OS.

Thanks,

Attachment: test_64d9d3db.zip

Dilli Babu Nandha Gopal [Syncfusion]
Replied On December 18, 2018 05:46 PM UTC

Hi Federico, 

Greeting from Syncfusion. 

On further analyzing in depth with the reported problem, we suspect that the font used in generated PDF are not available in another machine (MAC and Linux). So, it doesn’t preserve properly while opening PDF in that particular environment (like safari browser in MAC). To resolve this problem, we suggest you to embed the fonts into PDF while converting the Word document into PDF using EmbedFonts and EmbedCompleteFonts API.

Please refer the below UG documentation link to embed fonts in the PDF document while performing Word to PDF conversion:
https://help.syncfusion.com/file-formats/docio/word-to-pdf#embedding-fonts
 

Regards, 
Dilli babu. 


CONFIRMATION

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

;