Font Rendering issue (Word to PDF)

Hi Team,

I am evaluating DocIO library for converting Word file to PDF, but have noticed issues while font rendering.

The text doesn't look same after the file is converted to PDF.

To give you an example below are the screenshots:

Word File Screenshot: (Font Name: Cambria (Headings))


Converted PDF File Screenshot:

Note:
The code is created as an Azure Function.

Below are the assemblies we are using:
"Syncfusion.Compression.Base": "16.2.0.46",
"Syncfusion.DocIO.Base": "16.2.0.46",
"Syncfusion.DocToPdfConverter.Base": "16.2.0.46",
"Syncfusion.OfficeChart.Base": "16.2.0.46",
"Syncfusion.OfficeChartToImageConverter.Wpf": "16.2.0.46",
"Syncfusion.Pdf.Base": "16.2.0.46",
"Syncfusion.SfChart.WPF": "16.2.0.46"

I have also attached my code snippet.

Please guide me.


Attachment: Code_226eb864.zip

7 Replies

PB Parth Bhaidani August 28, 2018 06:21 AM UTC

Hello Experts,

Any thoughts on this?

Thanks!


DB Dilli Babu Nandha Gopal Syncfusion Team August 28, 2018 04:05 PM UTC

Hi Parth, 

We have tried to reproduce the reported problem using the given details but it works properly at our end. For your reference, we have attached a sample application which we tried at our end to reproduce the problem.
Please find the sample from the below link:
https://www.syncfusion.com/downloads/support/directtrac/213566/ze/SampleApp-1668869226.zip

Please find the input Word document, which we used to reproduce the reported problem and the generated PDF from the below link:
https://www.syncfusion.com/downloads/support/directtrac/213566/ze/Documents-923403208.zip

From the given code example, we have found that you used word document from Base64 string. We suspect that the reported problem might be due to the contents in the input Word document and the code snippets used at your end. So, could you please provide us the modified sample of above along with the input Word document and the complete code snippets (Base64 string) used at your end to reproduce the issue. Thereby, we will analyze further and will provide you the appropriate solution at the earliest.

Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face.

 
Regards, 
Dilli babu. 



PB Parth Bhaidani August 29, 2018 06:32 AM UTC

Hi,

Thanks a lot for your reply.

For your feasibility I have uploaded a zip on OneDrive bearing the Azure Function code as well as a windows app code calling the Azure function, also I have added in the sample word file and the converted PDF file for your reference.


Thanks,

Parth Bhaidani



DB Dilli Babu Nandha Gopal Syncfusion Team September 5, 2018 04:58 AM UTC

Hi Parth, 

We have confirmed that the reported issue with Font is mismatch in word to pdf conversion is a defect. The fix for this issue will be included in our Essential Studio 2018 Volume 3 SP1 release which is estimated to be available by October, 2018 tentatively. 
 
Regards, 
Dilli babu. 



BD Bart de keersmaeker November 15, 2018 12:56 PM UTC

Hi,

We did inject the latest version (16.3451.0.29) and deployed the PDF base solution to azure.
When converting the word document to PDF, some fonts are not correctly embedded (for example Blackadder IT is not correctly injected into the pdf file).

Are we able to use this type of "exotic" fonts on a cloud infrastructure ?

Kind regards,
Bart,


BD Bart de keersmaeker November 15, 2018 12:59 PM UTC

public static byte[] ToPdf(this WordDocument wordDocument)
        {
            using (var converter = new DocToPDFConverter())
            {
                converter.Settings.PdfConformanceLevel = PdfConformanceLevel.Pdf_A1B;
                converter.Settings.EmbedFonts = true;

                var pdfDocument = converter.ConvertToPDF(wordDocument);

                using (var memoryStream = new MemoryStream())
                {
                    pdfDocument.Save(memoryStream);
                    pdfDocument.Close(true);
                    return memoryStream.ToArray();
                }
            }
        }


DB Dilli Babu Nandha Gopal Syncfusion Team November 20, 2018 12:23 PM UTC

Hi Bart, 
 
On analyzing further with the given details, we suspect that the issue might occurs due to the unavailability of Blackadder ITC font in Azure environment. So, that the Microsoft Sans Serif font used instead of Blackadder ITC font in Word to PDF conversion. We have created MSDN forum regarding this issue. We will update you further details once we get update in this forum and meanwhile, we are requesting you to check this forum periodically. 
 
 
Please let us know if you have any questions. 
 
Regards, 
Dilli babu. 


Loader.
Up arrow icon