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

Free Support Forum - aspose.com

Encoding problem with diactritic character while saving as pdf

Dear Aspose Team,


I need a support in encoding while saving the word file as pdf.

I’m using aspose words 16.3 version and exporting the PDF like using below code

public Stream CreatePDF(Document asposeDocument)

{

Stream result = new MemoryStream();

asposeDocument.Save(result,SaveOptions.CreateSaveOptions(SaveFormat.Pdf));

result.Position = 0;

}

I am facing with the document have Diacritic character like Ẵ, Ɓ, Ĉ, É, It is displayed as Square box in PDF like this Ẵ, Ɓ, Ĉ, É

Can you please help me out ho can i solve the issue with Diacritic character?

Hi Ashish,

Thanks for your inquiry. Could you please attach your input Word document and output PDF file showing the undesired behavior here for testing? We will investigate the issue on our end and provide you more information.

Best regards,

Hi Awais Hafeez,


Thank you for your Valuable reply.

Here i am attached the 2 document with Word and PDF.

In Word document diacritic character looks fine but when it converted it to PDF using this line

asposeDocument.Save(result,SaveOptions.CreateSaveOptions(SaveFormat.Pdf));

Then it creates a problem, then some of the diacritic character converted into square brackets [].

Please help me out how can i solve this issue.





Hi Ashish,


Thanks for your inquiry. After an initial test with Aspose.Words for .NET 16.3.0, I was unable to reproduce this issue on my side (please see attached 16.3.0.pdf). I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this helps.
http://www.aspose.com/downloads/words-family/net

Also, please make sure that the following fonts are installed on your machine:

  • Times New Roman
  • Verdana
  • Calibri

Best regards,

Hi Awais Hafeez,


Thank you for your valuable reply.

I have already installed the trial version of Aspose.Words for .NET 16.3.0 and all the fonts are also installed which you mentioned above.


As i mentioned in my first post that I have a below method in my file

public Stream CreatePDF(Document asposeDocument) {

Stream result = new MemoryStream();

asposeDocument.Save(result,SaveOptions.CreateSaveOptions(SaveFormat.Pdf));

result.Position = 0;

}

When it is saved the file as PDF and return in Stream then the diacritic character print as square brackets, but if i do not convert the document to PDF and export as Doc then none of the diacritic character convert to square brackets.

It would be great if you can attached the sample.

Thanks in advance!


Hi Ashish,


Thanks for your inquiry. We did use the code from following article on our end:
How to Convert a Document to PDF

To ensure timely and accurate response, please create a standalone runnable console application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing. As soon as you get this simple application ready, we’ll start further investigation into your issue and provide you more information. Thanks for your cooperation.

Best regards,