Forums / Developer / error when using paradoxpdf - Urgent

error when using paradoxpdf - Urgent

Author Message

viraj hoober

Tuesday 13 July 2010 12:42:47 am

Hi. Just installed the extension paradoxpdf and i get the following error message while generating a pdf. Any idea where i went wrong? Some help will be greatly appreciated.

[ Jul 13 2010 09:30:23 ] Failed executing command : java -Djava.awt.headless=true -jar extension/paradoxpdf/bin/paradoxpdf.jar var/ezwebin_site/paradoxpdf/7d18a73f3a84beaa2000961796fb2b0d.xhtml var/ezwebin_site/paradoxpdf/7d18a73f3a84beaa2000961796fb2b0d.pdf 2>&1 ,
Output : ERROR: 'The element type "img" must be terminated by the matching end-tag "</img>".'
Exception in thread "main" org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). org.xml.sax.SAXParseException: The element type "img" must be terminated by the matching end-tag "</img>".
at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:191)
at org.xhtmlrenderer.resource.XMLResource.load(XMLResource.java:71)
at org.xhtmlrenderer.swing.NaiveUserAgent.getXMLResource(NaiveUserAgent.java:211)
at org.xhtmlrenderer.pdf.ITextRenderer.loadDocument(ITextRenderer.java:134)
at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:138)
at com.tricinty.ParadoxPDF.export(ParadoxPDF.java:121)
at com.tricinty.ParadoxPDF.main(ParadoxPDF.java:59)
Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The element type "img" must be terminated by the matching end-tag "</img>".
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:723)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:317)
at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:189)
... 6 more
Caused by: org.xml.sax.SAXParseException: The element type "img" must be terminated by the matching end-tag "</img>".
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1234)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:640)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:711)
... 8 more
[ Jul 13 2010 09:32:38 ] Failed executing command : java -Djava.awt.headless=true -jar extension/paradoxpdf/bin/paradoxpdf.jar var/ezwebin_site/paradoxpdf/1902fe473b1e77a90f7310269c3be598.xhtml var/ezwebin_site/paradoxpdf/1902fe473b1e77a90f7310269c3be598.pdf 2>&1 ,
Output : ERROR: 'The element type "img" must be terminated by the matching end-tag "</img>".'
Exception in thread "main" org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). org.xml.sax.SAXParseException: The element type "img" must be terminated by the matching end-tag "</img>".
at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:191)
at org.xhtmlrenderer.resource.XMLResource.load(XMLResource.java:71)
at org.xhtmlrenderer.swing.NaiveUserAgent.getXMLResource(NaiveUserAgent.java:211)
at org.xhtmlrenderer.pdf.ITextRenderer.loadDocument(ITextRenderer.java:134)
at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:138)
at com.tricinty.ParadoxPDF.export(ParadoxPDF.java:121)
at com.tricinty.ParadoxPDF.main(ParadoxPDF.java:59)
Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The element type "img" must be terminated by the matching end-tag "</img>".
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:723)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:317)
at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:189)
... 6 more
Caused by: org.xml.sax.SAXParseException: The element type "img" must be terminated by the matching end-tag "</img>".
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1234)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:640)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:711)
... 8 more

Christian Rößler

Tuesday 13 July 2010 1:00:01 am

Hy,

if you read the errormessage carefully, you might spot this lines:

Output : ERROR: 'The element type "img" must be terminated by the matching end-tag "</img>".'

It seems your templates are a mess. ParadoxPDF needs well formed and valid xhtml. Open IMG-Tags without closing them does not really help parsing this structure to perform a pdf-rendering process.

View the generated xhtml-sourcecode, spot the errors, fix your templates, escape all userinput (perhaps you echo'ed a alt-tag for this image and the user typed in a " ?), clear the cache, try again.

A online html-validator might help.

It's not really paradoxPDF's fault. But it's engine (SAX) needs well formed xhtml/xml to perform a pdf creation.

Hope it helps.

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

viraj hoober

Thursday 15 July 2010 1:24:47 am

Hi christian,

can you please give me some information how i can tidy the html codes generated. eztidy could do the work but i could not download it. Can you please help me?

Christian Rößler

Thursday 15 July 2010 4:52:17 am

"

Hi christian,

can you please give me some information how i can tidy the html codes generated. eztidy could do the work but i could not download it. Can you please help me?

"

Tidy might help you a bit, but it would be best to fix the templates manually.
I don't know the extension ezTidy, thus cannot really help you there. Downloading seems straight forward. Get the archive from http://projects.ez.no/eztidy/downloads/unstables/eztidy_0_9 and follow the instructions in it. I also dont know what the best stragtegy might be using this extension.
ezTidy ships a template operator and an output filter if i see it correctly.

cheers, chris

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

Christian Rößler

Thursday 15 July 2010 4:55:12 am

ahh, i currently see that this file you can download is not a tar.gz, its only a tar.

You can grab a corrected version from here: http://www.blackmill.de/downloads/eztidy_0.9.tar.gz

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613