Document document = new Document ();
PdfWriter writer = PdfWriter.getInstance ( document, new FileOutputStream ( "d:/fhpl.pdf" ) );
document.setMargins ( 0.1f, 0.1f, 0.1f, 0.1f );
document.setPageSize ( PageSize.A3 );
document.open ();
XMLWorkerHelper.getInstance ().parseXHtml ( writer, document, new FileInputStream ( "d:/fhpl1.html" ) );
document.close ();
Note: Before document.open(); to place all your customize settings.
PdfWriter writer = PdfWriter.getInstance ( document, new FileOutputStream ( "d:/fhpl.pdf" ) );
document.setMargins ( 0.1f, 0.1f, 0.1f, 0.1f );
document.setPageSize ( PageSize.A3 );
document.open ();
XMLWorkerHelper.getInstance ().parseXHtml ( writer, document, new FileInputStream ( "d:/fhpl1.html" ) );
document.close ();
Note: Before document.open(); to place all your customize settings.
No comments:
Post a Comment