From f3338fb501ed2b8bd512917fcabe2770832e68db Mon Sep 17 00:00:00 2001 From: Claudia Murialdo Date: Thu, 5 Oct 2023 14:17:01 -0300 Subject: [PATCH 1/2] Do not register standard fonts for DefaultFontProvider as it sets wrong fonts for some HTML elements. --- dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs b/dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs index f5c2fb99f..2dd2fecd0 100644 --- a/dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs +++ b/dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs @@ -102,7 +102,7 @@ protected override void init(ref int gxYPage, ref int gxXPage, int pageWidth, in pdfDocument = new PdfDocument(writer); pdfDocument.SetDefaultPageSize(this.pageSize); document = new Document(pdfDocument); - document.SetFontProvider(new DefaultFontProvider()); + document.SetFontProvider(new DefaultFontProvider(false, true, false)); } catch (PdfException de) { From 9e043bb71862590b913465d182835a569686d5a5 Mon Sep 17 00:00:00 2001 From: Claudia Murialdo Date: Thu, 5 Oct 2023 20:01:38 -0300 Subject: [PATCH 2/2] Avoid loading standardFonts and shippedFonts in the DefaultFontProvider as fonts are already specified in the PDFReport.ini --- dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs b/dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs index 2dd2fecd0..6c2918fce 100644 --- a/dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs +++ b/dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs @@ -102,7 +102,7 @@ protected override void init(ref int gxYPage, ref int gxXPage, int pageWidth, in pdfDocument = new PdfDocument(writer); pdfDocument.SetDefaultPageSize(this.pageSize); document = new Document(pdfDocument); - document.SetFontProvider(new DefaultFontProvider(false, true, false)); + document.SetFontProvider(new DefaultFontProvider(false, false, false)); } catch (PdfException de) {