I am using C# code to convert an Excel file to PDF, but the quality of the icons is poor; they appear very pixelated.
--------------------------------------------------------
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);
}
}
}
}
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.
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.
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.
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,
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