Community
Participate
Working Groups
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.
Created attachment 107190 [details] rptdesign file and pdf file for each scenario
For Scenario 2, width attribute of TD does not work in generated pdf, see the PNG file in attachment.
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.
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.
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.
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.
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.
2.2.0 can not support html table in PDF, it only display text in cells.
*** This bug has been marked as a duplicate of bug 241194 ***