iTextSharp creates PDF with blank pages
I've just added the iTextSharp XMLWorker nuget package (and its dependencies) to my project and I'm trying to convert the HTML from a string into a PDF file, even though no exceptions are being thrown, the PDF file is being generated with two blank pages. Why? The previous version of the code was using just iTextSharp 5.5.8.0 with HTMLWorker and ParseList method, then I switched to Here is the code I'm using: public void ExportToPdf() { string htmlString = ""; Document document = new Document(PageSize.A4, 40, 40, 40, 40); var memoryStream = new MemoryStream(); PdfWriter writer = PdfWriter