You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of my reports, I am using an image item with the following properties:
width: not set
height: not set
proportionalScale: true
fitToContainer: true
In the onCreate event of the image, I set the height to 22cm:
this.height = "22cm";
In the PDF emitter, this has the desired effect that the full image is shown and it is not distorted (the aspect ratio is intact), independent of the image's actual image dimensions (eg if it's portrait or landscape). The setting causes a maximum width of the container available width and a maximum height of 22 cm, and the image uses at most this given space.
In my case, the image is more or left quadratic, and the available width is 161.9 mm, so this is rendered with a height of ~ 161mm:
In the DOCX emitter, the effect is not as desired:
The emitter seems to ignore the combination that proportionalScale and fitToContainer are both true.
The image is rendered truncated:
I attempted to fix this by also setting the maximum width to 161mm in the onCreate event.
In this case, the image is shown in full (not truncated), but it is distorted:
If you wonder, why I don't set the height property directly? Well, I have half a dozen of places in the report where an image comment can be shown. Setting the height directly causes a huge empty space in the designer, which makes editing the design a torture.
Note that the images in this report are not fixed, they are stored in the database and their dimensions can differ, some can be portrait, others landscape etc.
The text was updated successfully, but these errors were encountered:
Short result of first tests, I started a retest based on the reports of #1406 which includes a report with "hook"-images and a report with a "butterfly"-image and it looks good.
I tested PDF & DOCX in version BIRT 4.14 & BIRT 4.18.
The result is that both BIRT-versions create the same output for PDF & DOCX.
I can confirm that the option "fit to container" hasn't the correct effect of DOCX like for PDF.
This effect is already given with BIRT 4.14.
I will go ahead with he debuger and the mentioned location.
In one of my reports, I am using an image item with the following properties:
In the
onCreate
event of the image, I set the height to 22cm:In the PDF emitter, this has the desired effect that the full image is shown and it is not distorted (the aspect ratio is intact), independent of the image's actual image dimensions (eg if it's portrait or landscape). The setting causes a maximum width of the container available width and a maximum height of 22 cm, and the image uses at most this given space.
In my case, the image is more or left quadratic, and the available width is 161.9 mm, so this is rendered with a height of ~ 161mm:
In the DOCX emitter, the effect is not as desired:
The emitter seems to ignore the combination that
proportionalScale
andfitToContainer
are both true.The image is rendered truncated:
I attempted to fix this by also setting the maximum width to 161mm in the onCreate event.
In this case, the image is shown in full (not truncated), but it is distorted:
If you wonder, why I don't set the height property directly? Well, I have half a dozen of places in the report where an image comment can be shown. Setting the height directly causes a huge empty space in the designer, which makes editing the design a torture.
Note that the images in this report are not fixed, they are stored in the database and their dimensions can differ, some can be portrait, others landscape etc.
The text was updated successfully, but these errors were encountered: