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)
Different PDF format when generated with and without viewer
Smithdon
<div>I've a simple report with only one table and paper size set as A4. On the viewer the PDF format is correct but when generated by calling a Java class, the alignment is messed up. It has huge margin on the right, tried setting margin to 0, align center... but no luck</div>
<div> </div>
<div>Here is the Java code </div>
<div> </div>
<pre class="_prettyXprint">
PDFRenderOption pdfOptions = new PDFRenderOption();
pdfOptions.setOutputFormat(RenderOption.OUTPUT_FORMAT_PDF);
pdfOptions.setEmitterID(RenderOption.OUTPUT_EMITTERID_PDF);
pdfOptions.setOption(IPDFRenderOption.PAGE_OVERFLOW, IPDFRenderOption.FIT_TO_PAGE_SIZE);
pdfOptions.setOutputStream(response.getOutputStream());
</pre>
<p> I'm using Birt 4.4.0</p>
Find more posts tagged with
Comments
mwilliams
<p>Are you using the RunAndRender task or separate Run and Render tasks?</p>
Smithdon
<p>Thank you for your reply.</p>
<p> </p>
<p>Yes, I'm using RunAndRender task. Here is the class file <a data-ipb='nomediaparse' href='
https://github.com/joshlong/spring-birt/blob/master/spring-birt-integration/src/main/java/org/eclipse/birt/spring/core/AbstractSingleFormatBirtView.java'>https://github.com/joshlong/spring-birt/blob/master/spring-birt-integration/src/main/java/org/eclipse/birt/spring/core/AbstractSingleFormatBirtView.java</a></p>
;
mwilliams
<p>How are you calling PDF from the viewer? Exporting the report after running in the viewer? Or using the format=pdf url parameter? If the URL approach, are you using "frameset" in the URL or "run"?</p>
<p> </p>
<p>If exporting to PDF or using a frameset URL, you might try using separate run and render tasks. Is there any way you can attach a sample report that uses the classic models sample database that I can run so I know I will see the issue? Thanks.</p>