When i try to convert Html to Pdf using itext. It is only showing blank pages, pdf content is missing.please help
Document document = new Document();
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("C:\\Users\\appadmin\\git\\SoharPDF\\template\\sample2.pdf"));
document.open();
XMLWorkerHelper.getInstance().parseXHtml(writer, document, new FileInputStream("C:\\Users\\appadmin\\git\\SoharPDF\\template\\Form W9_out.html"), Charset.forName("UTF-8"));
document.close();
Thanks.
Try this approach: