UTF8 symbol are not showing on pdf after exporting from excel to pdf

Hi,

I'm trying to export an Excel file to PDF but utf8 characters doesn't show up properly.

Those ½, ñ are being shown with different symbols.

This is the code I'm using:


using ExcelEngine excelEngine = new ExcelEngine();

IApplication application = excelEngine.Excel;

application.DefaultVersion = Syncfusion.XlsIO.ExcelVersion.Xlsx;


IWorkbook workbook = application.Workbooks.Open(excelStream);

//Initialize XlsIO renderer

XlsIORenderer renderer = new XlsIORenderer();

 //Initialize XlsIORendererSettings

XlsIORendererSettings settings = new XlsIORendererSettings();

settings.LayoutOptions = LayoutOptions.FitSheetOnOnePage;

//Convert Excel document into PDF document

PdfDocument pdfDocument = renderer.ConvertToPDF(workbook, settings);

 //Save the document into a stream

 using MemoryStream outputStream = new MemoryStream();

 pdfDocument.Save(outputStream);


excelStream variable is the content I get from my existing Excel and it doesn't have this issue.

Thanks!




1 Reply

YV Yaavann Vignesh Sethuraman Syncfusion Team November 26, 2024 12:54 PM UTC

Hi Mayko Estevez,

We are unable to reproduce the reported issue at our end. We have attached the sample tried at our end and also the output pdf file. Kindly please refer to it. Also We recommend you to modify the sample and share it along with the input documents to reproduce the issue. This will help us to proceed further and provide you with a solution at the earliest.

Regards,
Yaavann


Attachment: CoreSample_93502ed9.zip

Loader.
Up arrow icon