Add #if !NET8 back in to pass the .net core tests
This commit is contained in:
parent
65a433e9ab
commit
54799f54ec
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user