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. Image for the cookie policy date

Convert from Presentation to Pdf doesn't show Unicode Icons

Hey,
so I am converting a PPTX to a PDF.
As a result the unicode symbols do not show up.
I made an example code and attached the two results.
How I am able to fix this?

IPresentation pptxDoc = Presentation.Create();
ISlide firstSlide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
ITable table = firstSlide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
table.Rows.First().Cells.First().TextBody.AddParagraph($"\u2B9C");
table.Rows.First().Cells.Last().TextBody.AddParagraph($"\u2B9E");
table.Rows.Last().Cells.First().TextBody.AddParagraph($"\u2B9C\u2B9C");
table.Rows.Last().Cells.Last().TextBody.AddParagraph($"\u2328");

pptxDoc.Save(fileName.Replace("pdf", "pptx"));

PdfDocument pdfDocument = PresentationToPdfConverter.Convert(pptxDoc);

pdfDocument.Save(fileName);

pdfDocument.Close(true);

pptxDoc.Close();


Attachment: pdf_and_pptx_14fb3b4b.rar

5 Replies

RM Ramaraj Marimuthu Syncfusion Team September 9, 2019 12:34 PM UTC

Hi Paul,

Thank you for contacting Syncfusion support.
 
We can reproduce the issue with “Unicode icon is not rendering while converting a PowerPoint Presentation to PDF” and we suspect this to be a defect in our product. We will update you with further details on September 11, 2019.

Please let us know if you need any further assistance in this.

Regards,
Ramaraj Marimuthu.
 



PA Paul Abramov September 12, 2019 07:14 AM UTC

Hey Ramaraj,

you wanted to update me yesterday, so just asking, how is it going?
Any results?

Kind regards
Paul Abramov


VA Vijayasurya Anandhan Syncfusion Team September 12, 2019 09:43 AM UTC

Hi Paul,

Thank you for your patience.

From our further analysis, we found that glyph for the specified characters “
⮞⌨ ” are not available in a default font “Calibri”. So only these characters are missed in a converted PDF document. To overcome this issue, kindly use “Segoe UI Symbol” font for the paragraph in your end. Please find the below code snippet, which works properly in our end. 
 
 
IPresentation pptxDoc = Presentation.Create(); 
ISlide firstSlide = pptxDoc.Slides.Add(SlideLayoutType.Blank); 
ITable table = firstSlide.Shapes.AddTable(2, 2, 100, 120, 300, 200); 
IParagraph paragraph = table.Rows.First().Cells.First().TextBody.AddParagraph($"\u2B9C"); 
//Set font name of the paragraph text part as "Segoe UI Symbol" 
paragraph.TextParts[0].Font.FontName = "Segoe UI Symbol"; 
paragraph = table.Rows.First().Cells.Last().TextBody.AddParagraph($"\u2B9E"); 
paragraph.TextParts[0].Font.FontName = "Segoe UI Symbol"; 
paragraph = table.Rows.Last().Cells.First().TextBody.AddParagraph($"\u2B9C\u2B9C"); 
paragraph.TextParts[0].Font.FontName = "Segoe UI Symbol"; 
paragraph = table.Rows.Last().Cells.Last().TextBody.AddParagraph($"\u2328"); 
paragraph.TextParts[0].Font.FontName = "Segoe UI Symbol"; 
PdfDocument pdfDocument = PresentationToPdfConverter.Convert(pptxDoc); 
pdfDocument.Save("Output.pdf"); 
pdfDocument.Close(true); 
pptxDoc.Close();

 

Please let us know if you need any further assistances in this.

Regards,
Vijayasurya A
 



PA Paul Abramov September 12, 2019 10:43 AM UTC

Hey,

awesome! this works for me just fine, thank you very much for the snippet and the solution!

Kind Regards
Paul Abramov


VA Vijayasurya Anandhan Syncfusion Team September 13, 2019 06:28 AM UTC

Hi Paul,

Thank you for your update.

We are happy to know that our solution helped you.

Please let us know if you need further assistance in this. As always, we will be happy to assist you.

Regards,
Vijayasurya A


Loader.
Up arrow icon