I want to make this example support Chinese. How can I do it?

How to preserve Chinese characters when converting a PowerPoint file (pptx) containing Chinese characters to PDF ?


The example loses Chinese characters during conversion,how to fix it?


https://github.com/SyncfusionExamples/PowerPoint-Examples/tree/master/PPTX-to-PDF-conversion/Convert-PowerPoint-presentation-to-PDF/Blazor/WASM-app


1 Reply

DA Dharanitharan Ayyasamy Syncfusion Team June 11, 2024 02:05 PM UTC

Hi Iburke,

Upon further analysis, we found that the reported problem occurs due to missing fonts in the Blazor WASM environment.

To convert a PowerPoint presentation to PDF, it is necessary to access the font stream internally. However, this cannot be done automatically in a Blazor WASM application. Therefore, we recommend using a Server app, even though Presentation to PDF conversion works in a WASM app.

The PowerPoint Presentation library supports an event handler to substitute fonts when the necessary fonts are not available in the production environment during PPTX to PDF/image conversion.

To achieve proper preservation in the generated PDF in a Blazor WASM application, we suggest using the font substitution event during PPTX to PDF conversion.

We have prepared a Blazor WASM sample application to apply font substitution for the required Chinese text fonts and it can be downloaded from the below attachment.

Regards,
Dharanitharan A


Attachment: BlazorWASMAPP_ca7ab5d4.zip

Loader.
Up arrow icon