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

Bug 317021

Summary: PDF rendering shrinks report layout
Product: z_Archived Reporter: Massimo Bisogni <massimobisogni>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: VERIFIED FIXED QA Contact: Xiaodan Wang <xwang>
Severity: normal    
Priority: P3 CC: bluesoldier, jouyang, wyan
Version: 2.3.0   
Target Milestone: 3.7.0   
Hardware: PC   
OS: Windows XP   
Whiteboard: Obsolete
Attachments:
Description Flags
pdf generated by Birt report engine
none
Report file
none
As requested has been enclosed the PDF file for fixed layout
none
pdf report generated with BIRT 2.6.0
none
Pdf report generated with Birt 2.6.1 RC1
none
report design using sample database
none
exported pdf of report design using sample database
none
pdf generated with Birt 2.6.1RC1 none

Description Massimo Bisogni CLA 2010-06-16 05:51:03 EDT
Build Identifier: 2.3.0

When rendering in preview for PDF, second page are displayed as
miniscule.

Reproducible: Always
Comment 1 Massimo Bisogni CLA 2010-06-16 05:54:42 EDT
Created attachment 172023 [details]
pdf generated by Birt report engine
Comment 2 Massimo Bisogni CLA 2010-06-16 06:05:21 EDT
Created attachment 172026 [details]
Report file
Comment 3 Massimo Bisogni CLA 2010-06-16 06:11:30 EDT
When rendering in preview for PDF,  the second page is displayed as
miniscule.
On the contrary when rendering this report in preview for .doc format or excel format it looks ok.
Comment 4 Massimo Bisogni CLA 2010-06-16 08:17:49 EDT
The pdf is created with option "fit to page"
Comment 5 Jun Ouyang CLA 2010-06-16 22:28:05 EDT
"fit to page" means "Scale the content of a page so that it can be displayed in 1 page". When there are too many content in a page, the content is very small.

This option is applied for all formats which support page size, such as pdf/postscript/ppt.
HTML doesn't support paper size.
DOC is not able to support "fit to page".
Comment 6 Massimo Bisogni CLA 2010-06-17 07:47:06 EDT
(In reply to comment #5)
> "fit to page" means "Scale the content of a page so that it can be displayed in
> 1 page". When there are too many content in a page, the content is very small.
> This option is applied for all formats which support page size, such as
> pdf/postscript/ppt.
> HTML doesn't support paper size.
> DOC is not able to support "fit to page".

Bug reopened because:
The content is displayed in more than one page (as you can see in the attached report). I've set a page break interval of 45 records.
But if this behaviour cannot be considered as a bug, i'd like to know if there is a way to display the pdf correctly using the "fit to page" option. This option is necessary to print the pdf correctly.
Comment 7 Wei Yan CLA 2010-06-17 13:09:54 EDT
Can you try the fix-layout? You can set it in the report property view. In this mode, the HTML have the same pagination with PDF.
Comment 8 Massimo Bisogni CLA 2010-06-18 04:51:32 EDT
(In reply to comment #7)
> Can you try the fix-layout? You can set it in the report property view. In this
> mode, the HTML have the same pagination with PDF.

I've set the option "Layout Preference" from "Auto Layout" to "Fixed Layout" but nothing is changed, pdf is always shrunk.
Comment 9 Wei Yan CLA 2010-06-18 13:25:14 EDT
Can you attach the PDF file for fixed layout?
Comment 10 Massimo Bisogni CLA 2010-06-21 04:22:10 EDT
Created attachment 172309 [details]
As requested has been enclosed the PDF file for fixed layout
Comment 11 Massimo Bisogni CLA 2010-07-21 10:34:05 EDT
The latest pdf attached has been created with Birt 2.3.0. Any news about this bug? Thanks, Massimo
Comment 12 Xiaoying Gu CLA 2010-08-26 02:15:39 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > "fit to page" means "Scale the content of a page so that it can be displayed in
> > 1 page". When there are too many content in a page, the content is very small.
> > This option is applied for all formats which support page size, such as
> > pdf/postscript/ppt.
> > HTML doesn't support paper size.
> > DOC is not able to support "fit to page".
> 
> Bug reopened because:
> The content is displayed in more than one page (as you can see in the attached
> report). I've set a page break interval of 45 records.
> But if this behaviour cannot be considered as a bug, i'd like to know if there
> is a way to display the pdf correctly using the "fit to page" option. This
> option is necessary to print the pdf correctly.

Massimo,

I thin(In reply to comment #11)
> The latest pdf attached has been created with Birt 2.3.0. Any news about this
> bug? Thanks, Massimo

It seems in 2.3.0 release the fixed layout doesn't work, which I can reproduce with a similar report.
Could you please try the latest 2.6.0 release build? The fixed layout works and pdf won't shrunk if you set fixed layout.
Comment 13 Massimo Bisogni CLA 2010-08-26 04:41:15 EDT
Created attachment 177504 [details]
pdf report generated with BIRT 2.6.0

Thanks for your answer. I've tried with Birt 2.6.0.
The attached pdf file is generated with Birt 2.6.0. Actually the pdf report is no more shrunk but:

a) Blank space is left between report data and bottom of page
b) Index of pages isn't displayed correctly. As you can see from pdf, since third page until fifth page, the index of page displayed is always "2 of 6".

There is a workaround or a fix for the two points listed above?

Thanks, 
Massimo
Comment 14 Xiaoying Gu CLA 2010-08-27 06:00:16 EDT
(In reply to comment #13)

> a) Blank space is left between report data and bottom of page

Try adjusting the masterpager margin setting. For example, change the bottom margin of masterpage to 0

> b) Index of pages isn't displayed correctly. As you can see from pdf, since
> third page until fifth page, the index of page displayed is always "2 of 6".

It seems to be a bug in 2.6.0 release. I can not reproduce this issue in latest 2.6.1 build (v20100827-0630). Could you please re-try with the 2.6.1 N-build?
Comment 15 Massimo Bisogni CLA 2010-08-27 07:30:47 EDT
Thanks for your answer. Actually I’ve saw that release 2.6.1 isn’t yet downloadable from Eclipse Birt site. It’s planned for 25-09-2010.
Do you know if there is a site from which Birt release 2.6.1 is already available for download?

Thanks,
Massimo
Comment 16 Xiaoying Gu CLA 2010-08-29 22:39:06 EDT
(In reply to comment #15)
> Thanks for your answer. Actually I’ve saw that release 2.6.1 isn’t yet
> downloadable from Eclipse Birt site. It’s planned for 25-09-2010.
> Do you know if there is a site from which Birt release 2.6.1 is already
> available for download?
> Thanks,
> Massimo

2.6.1 release is not available for downloaded yet. The target release date is 25-9-2010.
You can try the latest 2.6.1 RC1 build to verify this issue:
http://download.eclipse.org/birt/downloads/build.php?build=M-R1-2.6.1RC1-201008111039
Comment 17 Massimo Bisogni CLA 2010-08-30 07:38:23 EDT
Created attachment 177719 [details]
Pdf report generated with Birt 2.6.1 RC1

Thanks for your answer, I’ve downloaded version 2.6.1 RC1 from the indicated site and installed it. 
I’ve generated the pdf report with this Birt version, but the bug still exists (page numbers are wrong, exactly as happen with Birt version 2.6.0).
I’ve attached the pdf file.

Thanks,
Massimo
Comment 18 Xiaoying Gu CLA 2010-08-30 23:28:24 EDT
Created attachment 177801 [details]
report design using sample database

Massimo,

I can not reproduce this issue with the 2.6.1 rc1 build.
Please try my attached report design which simulates your report design but using the sample database. The report was using fixed layout + page break interval=40 (default value), and the page number in the outputed pdf was correct.

Could you try the report using sample db to see if it's correct in your environment?
Comment 19 Xiaoying Gu CLA 2010-08-30 23:32:58 EDT
Created attachment 177802 [details]
exported pdf of report design using sample database
Comment 20 Massimo Bisogni CLA 2010-08-31 09:17:27 EDT
Created attachment 177834 [details]
pdf generated with Birt 2.6.1RC1

Thanks for your answer. I've reinstalled the runtime environment of Birt 2.6.1 RC1 and now pages numbers are displayed correctly. 
I've attached the pdf generated. I have a question: at the bottom of each pdf page there is a black row. This doesn't happen with Birt runtime 2.3.0 (see attached file 172309). 
There is a way to avoid displaying this black row?

Thanks,
Massimo
Comment 21 Xiaoying Gu CLA 2010-08-31 23:34:31 EDT
(In reply to comment #20)
> Created an attachment (id=177834) [details]
> pdf generated with Birt 2.6.1RC1
> Thanks for your answer. I've reinstalled the runtime environment of Birt 2.6.1
> RC1 and now pages numbers are displayed correctly. 
> I've attached the pdf generated. I have a question: at the bottom of each pdf
> page there is a black row. This doesn't happen with Birt runtime 2.3.0 (see
> attached file 172309). 
> There is a way to avoid displaying this black row?
> Thanks,
> Massimo

Checked your report design and found that you have set the bottom border of master page to outset. So the 'black row' is actually the border of master page. This did not appear in 2.3.0 due to the bug #271596.

Please remove the bottom border of masterpage and the report will be correct then.
Comment 22 Xiaoying Gu CLA 2010-08-31 23:56:06 EDT
Correction, the bug about master page border should be:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=234598
Comment 23 Massimo Bisogni CLA 2010-09-01 06:16:33 EDT
Thanks for your answer, i've set the border bottom style of masterpage from "Outset" to "None" in Birt 2.3.0 and now the black row is no more displayed.
Just another question: there is a way to change dimensions of Layout box, in order to increase width of Layout box, in Birt 2.3.0 or higher?
Thanks,
Massimo
Comment 24 Xiaoying Gu CLA 2010-09-02 04:56:18 EDT
Set this bug as resovled since issues mentioned in this bug has been fixed in latest 2.6.1 build.
Comment 25 Xiaoying Gu CLA 2010-09-02 04:58:55 EDT
(In reply to comment #23)
> Just another question: there is a way to change dimensions of Layout box, in
> order to increase width of Layout box, in Birt 2.3.0 or higher?

Please try set masterpage type to custom and set the width and height by yourself.
Comment 26 Massimo Bisogni CLA 2010-09-02 10:09:51 EDT
Ok, I've tried and does it  work. Many thanks for your answers and your help,

Massimo
Comment 27 Xiaodan Wang CLA 2010-09-09 03:50:12 EDT
Set as Verified.