Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363043

Summary: PDF ist not rendered in landscape via Java-Application
Product: z_Archived Reporter: Marco <m.rieth>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: bluesoldier, lchen
Version: 3.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
zip none

Description Marco CLA 2011-11-07 07:44:56 EST
Build Identifier: 20110218-0911

Used Birt-Version: 3.7
I have a report with one masterpage, orientation set to landscape. I further generate the reports via a java-web-application, using the birt-api, calling the RunAndRenderTask and using the PDFRenderOption-Object as PDF-Emitter for rendering the report as pdf.
The result-pdf-report is orientation portrait, although i expect it to be rendered as landscape. Since the page size is portrait, the content seems to be rendered in landscape being cut-off on the left and right side.
Generating the report via Birt Report DEsigner works. As well does it work, when generating the report using the birt viewer (via URL) and exporting it as pdf.

Reproducible: Always

Steps to Reproduce:
1. Generate a report with one masterpage, set orientation to landscape, typ A4.
2. Print report using the following code (excerpt):
// Initiating BirtEngine 
IReportEngine reportEngine = <SomeClassThatInitalizesTheBirtEngine>;
IReportRunnable design = reportEngine.openReportDesign(<reportAsStream>);
IRunAndRenderTask theTask = reportEngine.createRunAndRenderTask(design);
PDFRenderOption options = new PDFRenderOption();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
options.setOutputStream(bos);
theTask.getAppContext().put("org.eclipse.datatools.enablement.oda.xml.inputStream", <someInputStream>);
theTask.getAppContext().put("org.eclipse.datatools.enablement.oda.xml.closeInputStream", "true");
theTask.setRenderOption(options);
theTask.run();
theTask.close();
Comment 1 Liwen Chen CLA 2011-12-29 02:31:45 EST
Hi,

I followed your description and could not reproduce it.

Please check attached zip containing report design and java class to render pdf

If you still can reproduce it, could you please attached your test report and java codes in detail?
Comment 2 Liwen Chen CLA 2011-12-29 02:32:03 EST
Created attachment 208840 [details]
zip
Comment 3 Xiaoying Gu CLA 2011-12-29 04:34:36 EST
Set as worksforme.
If still can reproduce it, please reopen this bug.

Thanks.