The quality of the icon is poor when I convert it to PDF

I am using C# code to convert an Excel file to PDF, but the quality of the icons is poor; they appear very pixelated.


This is my code c#
 thank you

--------------------------------------------------------


     newRelativeFilePath = "RI - JA-8336 (CM).xlsx";

     System.Globalization.CultureInfo.CurrentCulture =

                System.Globalization.CultureInfo.GetCultureInfo("fr-FR");


     XlsIORendererSettings settings = new XlsIORendererSettings

     {

         EmbedFonts = true

     };


     using (ExcelEngine excelE = new ExcelEngine())

     {

         IApplication application = excelE.Excel;

         application.DefaultVersion = ExcelVersion.Xlsx;


         //Initialize XlsIO renderer.

         XlsIORenderer renderer = new XlsIORenderer();


         using (FileStream excelStream = new FileStream(newRelativeFilePath, FileMode.Open, FileAccess.Read))

         {

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

             ExcelTemplater.CalculateFormulaForPdf(wb);


             //Convert Excel document with charts into PDF document

             using (PdfDocument pdfDocument = renderer.ConvertToPDF(wb, settings))

             {

                 using (Stream s = new FileStream(newRelativeFilePathPdf, FileMode.Create, FileAccess.ReadWrite))

                 {

                     if (data!.ContainsKey("annexes"))

                     {

                         AddAnnexes(JArray.Parse(data["annexes"].ToString()), pdfDocument);

                     }

                     pdfDocument.Save(s);

                 }

             }

         }

     }


Attachment: code_pdf_dc37a1ed.zip

5 Replies

YV Yaavann Vignesh Sethuraman Syncfusion Team December 18, 2024 08:04 AM UTC

Hi Aitbouhou Adam,

We are able to reproduce the reported issue at our end and currently validating it. We will share the validation details on December 20th, 2024.

Regads,
Yaavann.



YV Yaavann Vignesh Sethuraman Syncfusion Team December 20, 2024 02:24 PM UTC

Hi Aitbouhou,


We have confirmed the issue
 “Conditional formatting icon set quality is low in Excel to Pdf conversion” as a defect in our product and we will include the fix in weekly release on January 7th 2025.

 

Please use the below feedback link to track the status of the reported bug.

Feedback Link: Conditional formatting icon set quality is low in Excel to Pdf conversion in ASP.NET Core | Feedback Portal

 

 

Note: If you require a patch for the reported issue in any of our Essential Studio Main or SP release version, then kindly let us know the version, so that we can provide a patch in that version based on our SLA policy.

 

Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”

 

Regards,
Yaavann.



AS Atchaya Sekar Syncfusion Team January 7, 2025 06:56 PM UTC

Hi Aitbouhou,

 

We apologize for the inconvenience caused. We have prepared a custom NuGet package to resolve the issue: "Conditional formatting icon set quality is low in Excel to Pdf conversion" and have attached it below. Kindly try it and let us know if the issue is resolved. Additionally, the fix will be included in the next weekly release scheduled for January 14, 2025.


Note: First, Download and install the custom syncfusion.xlsio.net.core package then install syncfusion.xlsiorenderer nuget package.

 

Regards,

Atchaya S.



AS Atchaya Sekar Syncfusion Team January 12, 2025 06:54 PM UTC

Hi Aitbouhou,

Apologies for the oversight in the previous update. We missed attaching the custom patch. Please find it included below. As mentioned earlier, the fix will also be included in the next weekly release scheduled for January 14, 2025.

Regards,

Atchaya S.

Attachment: CustomPatch_9f01251f.zip


AH Alex Harson James Henso Syncfusion Team February 3, 2025 12:21 PM UTC

Hi Aitbouhou,

 

We have included the fix to resolve the issue "Conditional formatting icon set quality is low in Excel to Pdf conversion" in our weekly NuGet release version 28.2.3. Kindly upgrade your Syncfusion packages to this new 28.2.3 version and let us know if the issue is resolved.

 

NuGet Package: NuGet Gallery | Syncfusion.XlsIORenderer.Net.Core 28.2.3

 

Regards,

Alex Harson James H


Loader.
Up arrow icon