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

eZ debug

Timing: Jan 18 2025 05:21:37
Script start
Timing: Jan 18 2025 05:21:37
Module start 'content'
Timing: Jan 18 2025 05:21:37
Module end 'content'
Timing: Jan 18 2025 05:21:37
Script end

Main resources:

Total runtime0.8784 sec
Peak memory usage4,096.0000 KB
Database Queries201

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 589.1797180.8281
Module start 'content' 0.00640.7288 770.0078548.8203
Module end 'content' 0.73510.1431 1,318.8281342.0938
Script end 0.8782  1,660.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4832210.0002
Check MTime0.00150.1718210.0001
Mysql Total
Database connection0.00110.128210.0011
Mysqli_queries0.798490.89512010.0040
Looping result0.00190.21081990.0000
Template Total0.851196.920.4255
Template load0.00200.226220.0010
Template processing0.849196.665920.4245
Template load and register function0.00010.016010.0001
states
state_id_array0.00070.081010.0007
state_identifier_array0.00080.092620.0004
Override
Cache load0.00180.2057680.0000
Sytem overhead
Fetch class attribute can translate value0.00100.113730.0003
Fetch class attribute name0.00120.131350.0002
XML
Image XML parsing0.00060.065530.0002
class_abstraction
Instantiating content class attribute0.00000.001250.0000
General
dbfile0.00290.3273210.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 8

Time used to render debug report: 0.0004 secs