Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BirtViewer 2.6.1 and Java 6 64bit
Ingo
Hi.<br />
<br />
I am trying to enable SVG output in the BirtViewer (Version 2.6.1) cause currently the fonts look "awful". <br />
<br />
As soon as I append <pre class='_prettyXprint _lang-auto _linenums:0'>&__svg=true</pre> I get the folowing exception:<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
03.01.2011 15:18:33 org.eclipse.birt.report.engine.api.impl.RenderTask render
SCHWERWIEGEND: Error happened while running the report.
java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
at org.eclipse.birt.chart.device.svg.SVGRendererImpl.writeDocumentToOutputStream(SVGRendererImpl.java:318)
at org.eclipse.birt.chart.device.svg.SVGRendererImpl.after(SVGRendererImpl.java:251)
at org.eclipse.birt.chart.factory.Generator.render(Generator.java:1311)
...
</pre>
<br />
<br />
I'm running it on a Tomcat 6 on a Windows 2008 Server with JDK 6 64Bit. Any suggestions? Any way to improve chart quality beside from that? <br />
<br />
BTW:<br />
When I render the report to pdf via the ReportEngine and the option <pre class='_prettyXprint _lang-auto _linenums:0'>options.setSupportedImageFormats("PNG;GIF;JPG;BMP;SVG");</pre> everything looks fine.<br />
<br />
Thanks,<br />
Ingo
Find more posts tagged with
Comments
JasonW
Ingo,
Can you try &__dpi=300?
Also if you could log a bug for the __svg parameter it would be good.
Jason
Ingo
Hi Jason.
I've just tried the option &__dpi=300...it works, BUT the result is not very useful, at least in my case. I specified the font-sizes in px and thus all fonts are now very very small. And even the lines in a line chart are hardly visible now...maybe I can switch the style definitions but this a bunch of work...
BTW: Is it possible to set parameters like dpi or svg in the webviewer in general (change the default values) or do I have to adjust all calling links to the reports?
I'll check if I can log the bug...
Thanks,
Ingo
JasonW
Ingo,
Currently svg and dpi are not setup as init parameters. Can you try this line in your beforeFactory script:
reportContext.getRenderOption().setOption("ChartDpi",300);
BTW you can try a different number that may be better.
Jason
Ingo
Hi Jason.
thanks for the quick reply. I'll try some different dpi settings...
What is the render option to enable svg via script? ChartSvg? Is there a list of these options? Maybe I can turn on svg rendering via this way without getting the exception...
Thanks again,
Ingo
JasonW
Ingo
Try:
xyz = reportContext.getRenderOption().getOption("supportedImageFormats");
reportContext.getRenderOption().setOption("supportedImageFormats", xyz +";SVG");
Jason
Ingo
Hi.
Okay I've tried your suggested solution and used the little script in the beforeRender report function. When running the report in the webviewer I get the same exception as before. The interesting thing is that the chart output gets even worse when I try to create a pdf right from the birt designer. Looks like a very compressed jpg...
/Ingo
JasonW
Do you have svg enabled in the designer preferences?
Ingo
I just tried it again with activated "Enable SVG chart" under "Report Design -> Preview". But since I'm not using "Preview" I'm getting no svg chart in the pdf (right?). I choose "View Report as PDF" straight from the toolbar...Do I have to activate SVG somewhere else?
/Ingo
JasonW
It should still pass the svg flag in the url. If you use external browser in the preferences you can see the url that is passed.
Jason
Ingo
Hi.
I've just tried the external browser setting...the svg flag is provided in the url and html output looks okay but when I try the PDF output straight from the designer the charts are not "rendered" as SVG.
/Ingo
JasonW
When you go straight to pdf can you see the url? If not set the preferences to use an external browser and see if the svg flag is in the url.
Jason
Ingo
Yep, this is what I tried to say. I switched to "use external browser" and thus I see the URL. It got &__svg=true in it but the charts are still not rendered as SVGs...the only way for me right now to get PDFs with svg charts is to use the ReportEngine in a Java program...
Ingo
JasonW
You are correct. Currently svg charts in PDF are not supported in the viewer.
Jason
Ingo
okay. So, I would appreciate that functionality. ;-)
I'm just curious. Is there any reason why this great feature is not turned on by default for PDFs. Charts look way better that way and I don't think that you need any plugin for the corresponding PDF viewer. (or do you?)
Thanks for great support!
Ingo
JasonW
I do not think it was turned off, just not implemented yet. You should be able to modify the viewer code to add it.
Jason