<span style="font-family:
'Segoe UI'; direction: ltr; word-wrap: break-word; color: #000000; font-size:
10pt;" dir="ltr">你好</span>Help
In word document i am able to see all the text and all the style is applied in the text.
Now i have converted this word file into the PDF file using the below code. Now in the PDF file text '你好' is not visible only Text 'Help' is visible. But if i select all text from the generated PDF file and paste it in the Notepad file then complete text '你好 Help' is copied. It means complete text is exist in the PDF but it is not visible. Now what i did I have removed the font family 'font-family: 'Segoe UI'' from the above html text. and i did again the same thing, now complete text is visible in the PDF file. it means issue is with the font family.And this font family is listed in font family list of the word document so it means it is exist in the system so we can not say that font family is not exist. Please help me on this what i need to do because we can not remove the font family from the html text.
DocToPDFConverter converter = new DocToPDFConverter();
PdfDocument pdfDoc =
converter.ConvertToPDF(wordDoc);
pdfDoc.Save("RFPQuoteSlip_" +
DateTime.Now.ToString()
+ ".pdf", Response, HttpReadType.Open);
Hi Amit Kumar,
Thank you for your interest in Syncfusion Products.
We suspect this to be defect from our side, we logged issue
report for this, and we will be fixing it internally.
Thanks,
Karthik
Hi Amit,
We have logged this as an issue report in our database, the fix for this issue will be available in our upcoming Volume 4 release.
Regards,
Karthikeyan.C
Hi Amit,
A quick note on previous update, the font “Segoe UI” doesn’t support the Unicode characters, so text not visible in the generated pdf. You can see this same behavior in Microsoft word also, but Microsoft word uses the font fallback to display the Unicode characters properly, here fallback font is “MS Mincho”.
The below screen shots show the font fall back behavior of MS word.
Exported pdf using MS word
Currently we don’t have the support for font fallback when converting the doc to pdf, so we have considered this as a defect and will fix this internally.
We suggest to use “MS Micho” or “Arial Unicode MS” font to display the Unicode (Chinese) characters properly.
With Regards,
Praveen
Hi Amit,
Thank you for your update,
“Arial” font doesn’t support the Chinese characters, please use the “Arial Unicode MS” to preserve the text properly in pdf.
var pStyle = (IWParagraphStyle)WDoc.AddParagraphStyle("TableCellFont10ArialBold");
pStyle.CharacterFormat.FontName = "Arial Unicode MS";
pStyle.CharacterFormat.FontSize = 10;
pStyle.CharacterFormat.Bold = true;
pStyle.ParagraphFormat.LeftIndent = 4;
paragraph.ApplyStyle( pStyle.Name);
Please try this and let us know the result.
With Regards,
Praveen
Hi Amit,
Thank you for your update,
Can you please provide us your server environment details, also send us the full code snippet to reproduce this issue, it will help us to investigate further in this.
With Regards,
Praveen
Hi Nishant,
Thank you for your update,
We have tested the sample and it is works fine in our side, we suspect that the issue occurs due to the font, please ensure the font “Arial Unicode MS” installed in your machine.
Please install the font and try the sample once again, if issue still persist please send us your output pdf document, it will help us to investigate further in this.
With Regards,
Praveen