Hi i am trying to use your product to convert from html to pdf,
but always giving me errors like:
-
com.aspose.html.internal.ms.System.NotSupportedException: getContentAreaBPD() called when it should have been overridden
-
Exception in thread “main” java.lang.ClassCastException: com.aspose.pdf.internal.html.dom.svg.SVGElement incompatible with com.aspose.pdf.internal.html.dom.svg.SVGGElement
and used below sample code :
String dir = “/rootPath”;
HtmlLoadOptions htmloptions = new HtmlLoadOptions();
Document doc = new Document(dir + “test.html”, htmloptions);
doc.save(dir + “aspose.pdf”);
and
HTMLDocument htmdoc = new HTMLDocument(dir + “tempHTML.html”);
// render to PDF & XPS
HtmlRenderer renderer = new HtmlRenderer();
renderer.render(new PdfDevice(new PdfRenderingOptions(), dir + “output.pdf”), htmdoc);
can u help me, which jar version to use and working sample code, and if i have css files and images needed how to link them
thanks