HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › pd4ml in a .jspx file used with success – up to a point …. › Re: Re: pd4ml in a .jspx file used with success – up to a point ….
Ok, done that.
.jspx files always put the xml version line and the doctype declaration, right at the top, followed by new lines.
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd"><br />
<root>
…..
once the
You can remove the top xml declaration by including this in the .jspx file
<jsp:output omit-xml-declaration="yes" />
and I can remove the doctype declaration if I want to by excluding this line from the code:
<jsp:output doctype-root-element="HTML" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd"/>
which I did, even though obviously these days a doc-type declaration is important.
Doing that I have source without any white spaces before the transform tag.
But it still doesn’t work if I put enabled=”false”.
Please also bear in mind that with enabled=”true” and without omitting the doc-type or any other attempted hack, it produces perfect .pdfs. The only problem is enabled=”false”.
But for me the enabled true/false functionality would be fundamental.
Thanks for your help and time.