Error with Image generating for PDF report [message #1842556] |
Wed, 23 June 2021 15:40  |
Eclipse User |
|
|
|
Hello,
When I use image item into my report, I have very strange behavior:
1. I have a dataset containing a field with all the URL access to the images (google drive links).
2. I create an image into a table which call the row["XXXX"] field as an "URI" OR with script by using "this.URL"... into the onRender, onCreate (I have tried lot of way to call the image link).
3. If I generate the pdf report like that it works perfectly. But as soon as I modify the width (directly into the layout property OR using the script this.width into the onPrepare), the pdf generating does not work properly (sometimes every image are replaced by the sentence "Error with Image generating for PDF report", sometimes only few images, sometimes it works but at the next generating it does not works).
Do you have any idea of the reason?
Example of URL (not working, just an example): https://drive.google.com/uc?export=view&id=1Ts_GlbF8bsAXozsfMIXz57cBfiOWi38I
[Updated on: Wed, 23 June 2021 15:42] by Moderator Report message to a moderator
|
|
|
Re: Error with Image generating for PDF report [message #1842563 is a reply to message #1842556] |
Wed, 23 June 2021 23:13   |
Eclipse User |
|
|
|
Hi,
I also had quite a bit of trouble with images in PDFs recently. In my case they stopped rendering at all, when they used to work fine, referenced as URLs like you were doing. I had no trouble with resizing the images though. In my case I my problem was instigated by changing the source URLs which now had to be from an HTTPS source, even when the source was the same as the document being generated. I tried implementing other image handlers but never worked. My only reliable solution was to use a scripted dataset to retrieve the image first and present it as blob in the dataset.
On reflection, when I was writing the scripted dataset I ran into various new problems with getting 403 errors from the web servers. This turned out to be from tightened security that only needed me to supply a valid header in the connection identifying the client. This might have been what broke BIRT for me.
A bonus of using the scripted dataset was that I could include some basic authentication with the connections and lockdown more resources.
|
|
|
|
Powered by
FUDForum. Page generated in 0.06068 seconds