From 54799f54ec75a1c88f380f1c5aa45f654a87f88e Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Wed, 28 May 2025 13:42:05 -0700 Subject: [PATCH] Add #if !NET8 back in to pass the .net core tests --- Fab2ApprovalSystem/PdfGenerator/StandardPdfRenderer.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Fab2ApprovalSystem/PdfGenerator/StandardPdfRenderer.cs b/Fab2ApprovalSystem/PdfGenerator/StandardPdfRenderer.cs index 877d3e9..2ae98e3 100644 --- a/Fab2ApprovalSystem/PdfGenerator/StandardPdfRenderer.cs +++ b/Fab2ApprovalSystem/PdfGenerator/StandardPdfRenderer.cs @@ -1,6 +1,8 @@ +#if !NET8 using iTextSharp.text; using iTextSharp.text.html.simpleparser; using iTextSharp.text.pdf; +#endif using System.IO; @@ -31,6 +33,7 @@ public class StandardPdfRenderer { public static MemoryStream GetPortableDocumentFormat(string pageTitle, string htmlText) { MemoryStream result = new(); +#if !NET8 using (Document pdfDocument = new Document(PageSize.A4, HorizontalMargin, HorizontalMargin, VerticalMargin, VerticalMargin)) { using (PdfWriter pdfWriter = PdfWriter.GetInstance(pdfDocument, result)) { pdfWriter.CloseStream = false; @@ -43,6 +46,7 @@ public class StandardPdfRenderer { } } } +#endif return result; }