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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 05:16:48
Script start
Timing: Jan 18 2025 05:16:48
Module start 'layout'
Timing: Jan 18 2025 05:16:48
Module start 'content'
Timing: Jan 18 2025 05:16:48
Module end 'content'
Timing: Jan 18 2025 05:16:48
Script end

Main resources:

Total runtime0.7723 sec
Peak memory usage4,096.0000 KB
Database Queries64

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 587.9219152.6250
Module start 'layout' 0.00570.0049 740.546939.4609
Module start 'content' 0.01060.7604 780.0078543.7422
Module end 'content' 0.77100.0013 1,323.750016.1563
Script end 0.7723  1,339.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4088160.0002
Check MTime0.00130.1725160.0001
Mysql Total
Database connection0.00180.229110.0018
Mysqli_queries0.710091.9273640.0111
Looping result0.00070.0928620.0000
Template Total0.736495.420.3682
Template load0.00210.271020.0010
Template processing0.734395.080420.3672
Template load and register function0.00020.030810.0002
states
state_id_array0.00150.196910.0015
state_identifier_array0.00070.094820.0004
Override
Cache load0.00190.2459680.0000
Sytem overhead
Fetch class attribute can translate value0.00060.079420.0003
Fetch class attribute name0.00140.184250.0003
XML
Image XML parsing0.00020.030820.0001
class_abstraction
Instantiating content class attribute0.00000.001550.0000
General
dbfile0.00080.1038100.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs