Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 240468 - BIRT can not process height and width attribute of HTML tag correctly
Summary: BIRT can not process height and width attribute of HTML tag correctly
Status: RESOLVED DUPLICATE of bug 241194
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.2.1   Edit
Hardware: PC Windows XP
: P1 blocker (vote)
Target Milestone: 2.3.1   Edit
Assignee: Gang Liu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-11 06:42 EDT by Ming Gu CLA
Modified: 2008-08-04 23:04 EDT (History)
6 users (show)

See Also:


Attachments
rptdesign file and pdf file for each scenario (39.04 KB, application/zip)
2008-07-11 07:29 EDT, Ming Gu CLA
no flags Details
difference of TD width and Image size between BIRT2.2.0 and BIRT2.2.1 (63.98 KB, application/x-zip-compressed)
2008-07-16 03:58 EDT, Ming Gu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ming Gu CLA 2008-07-11 06:42:19 EDT
In both 2.2.1 and 2.2.2 version, BIRT can not process height and width attribute of HTML tag correctly. There are two scenarios as follows:

Scenarios1: When using preview or preview as pdf feature, height and width attribute in a image are not correctly. The image in pdf is much bigger than theoriginal one. The rptproject and pdf result are in For-IMG-tag folder in attachemnt.

This defect can be reproduced by folowing steps:
1. New a rptdesign file 
2. Insert a Text element into BODY
3. Set the content of Text as <img src="dist1.gif" height="456"  width="594"  />, 594*456 is the original size of "dist1.gif".
4. View report as pdf, the image size is not as we set before, and bigger than 594*456.

Scenarios2: BIRT will ignore the width and height attibutes in TD tag in a table.The rptdesign and pdf result are in For-TD-tag folder in attachemnt.

This defect can be reproduced by folowing steps:
1. New a rptdesign file 
2. Insert a Text element into BODY
3. Insert a table with TD tag and set the size of each TD tag into Text content.
4. Preview it, the layout is correct, but preview as pdf the layout is mass.
Comment 1 Ming Gu CLA 2008-07-11 07:29:21 EDT
Created attachment 107190 [details]
rptdesign file and pdf file for each scenario
Comment 2 Ming Gu CLA 2008-07-11 07:36:49 EDT
For Scenario 2, width attribute of TD does not work in generated pdf, see the PNG file in attachment.
Comment 3 Bingxue Xu CLA 2008-07-11 20:42:28 EDT
This problem does not exist in BIRT 2.2.0. Could you please provide fix for both BIRT 2.2.1 and BIRT 2.2.2.
Comment 4 Gang Liu CLA 2008-07-15 05:03:36 EDT
For the first case: 
PDF use 72DPI to display image, while the screen dpi is 96, so image pdf looks larger than html.
Could you try it with absolute width such as "1in", "5cm" etc.
For the second case:
Birt only support column width, does not support cell width. So you can move the cell width to column, it should be ok.
Comment 5 Wei Yan CLA 2008-07-15 23:34:09 EDT
This is not a bug.  BIRT doesn’t support the height/width defined in the TD.   Please define the height/weight in the COLUM/TR. For the image size as the PDF uses different DPI with the screen display, so all size described in px is different.
Comment 6 Hu Xiang Dong CLA 2008-07-16 02:37:53 EDT
For the first issue about image size, there is no such problem in BIRT 2.2.0, so there should be something changed.
From a user's perspective, what I see is, the display in preview and in PDF is different, in PDF, the text size is not enlarged but the image size is enlarged, and in most cases this cause the problem that the image will be cut off. That definitely means something is wrong and need to be fixed.
Comment 7 Ming Gu CLA 2008-07-16 03:58:51 EDT
Created attachment 107573 [details]
difference of TD width and Image size between BIRT2.2.0 and BIRT2.2.1

In BIRT2.2.0, the image size is correct, and we do not set "in" or "cm" in the rptdesign, is there any changes between 2.2.0 and 2.2.1 in generating pdf image?

For width attribute of TD tag, the results of "preview as pdf" are different, in BIRT2.2.0, the second TD is moved to second line, but in BIRT2.2.1, these three TDs are in the same line and divide the width averagely.
Comment 8 Gang Liu CLA 2008-07-16 04:32:46 EDT
2.2.0 can not support html table in PDF, it only display text in cells.
Comment 9 Gang Liu CLA 2008-08-04 23:04:02 EDT

*** This bug has been marked as a duplicate of bug 241194 ***