import com.itextpdf.html2pdf.attach.impl.layout.HtmlPageHeader;

54 Views Asked by At
import com.itextpdf.html2pdf.HtmlConverter;
import com.itextpdf.html2pdf.attach.impl.layout.HtmlPageHeader; import com.itextpdf.layout.element.Paragraph;

HtmlPageHeader header = new HtmlPageHeader();
header.setScript("../../hisglobal/js/jquery-main.min.js");
document.add(header);

but I'm not able to find a jar with this, where I can import these imports. I have tried I io-7.1.9, and itext 5.*.* jar not html2pdf 7.2.0 where I can download this jar and use it without error.

1

There are 1 best solutions below

1
Akarsh Gaud On
document.addHeader(HtmlTags.JAVASCRIPT, "function addScript(){\r\n" +
                    "   var script = document.createElement('script');\r\n" + 
                    "   script.type= \"text/javascript\";\r\n" + 
                    "    script.src = '../../hisglobal/js/jquery-main.min.js';\r\n" + 
                    "    document.body.appendChild(script);\r\n""}");


document.setJavaScript_onLoad("addScript();");