Compare commits
	
		
			1 Commits
		
	
	
		
			ae8710e6d8
			...
			fix-core-t
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 54799f54ec | 
| @ -1,6 +1,8 @@ | |||||||
|  | #if !NET8 | ||||||
| using iTextSharp.text; | using iTextSharp.text; | ||||||
| using iTextSharp.text.html.simpleparser; | using iTextSharp.text.html.simpleparser; | ||||||
| using iTextSharp.text.pdf; | using iTextSharp.text.pdf; | ||||||
|  | #endif | ||||||
|  |  | ||||||
| using System.IO; | using System.IO; | ||||||
|  |  | ||||||
| @ -31,6 +33,7 @@ public class StandardPdfRenderer { | |||||||
|  |  | ||||||
|     public static MemoryStream GetPortableDocumentFormat(string pageTitle, string htmlText) { |     public static MemoryStream GetPortableDocumentFormat(string pageTitle, string htmlText) { | ||||||
|         MemoryStream result = new(); |         MemoryStream result = new(); | ||||||
|  | #if !NET8 | ||||||
|         using (Document pdfDocument = new Document(PageSize.A4, HorizontalMargin, HorizontalMargin, VerticalMargin, VerticalMargin)) { |         using (Document pdfDocument = new Document(PageSize.A4, HorizontalMargin, HorizontalMargin, VerticalMargin, VerticalMargin)) { | ||||||
|             using (PdfWriter pdfWriter = PdfWriter.GetInstance(pdfDocument, result)) { |             using (PdfWriter pdfWriter = PdfWriter.GetInstance(pdfDocument, result)) { | ||||||
|                 pdfWriter.CloseStream = false; |                 pdfWriter.CloseStream = false; | ||||||
| @ -43,6 +46,7 @@ public class StandardPdfRenderer { | |||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | #endif | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user