Home
Intelligence (Analytics)
Problem with image-path / How to set path of images?
iparker
Hello,
I have a problem with the output of images in my report. I have to use absolute-paths to the images. So I output the URI-images with something like
‘F:Apachemy_img_dir’+row["name"];
This works good in the web-viewer and the html-output, but it doesn’t work in the pdf-output or the rtf-output. Is there a possibility to set the directory where the images are located, so I can work with such absolute paths in pdf/rtf-output? I have red something about a setImageDirectory()-function, but I don’t know how to use this function in the script-part of my report.
Thanks for some answers – I’m very helpless!
Timo
Find more posts tagged with
Comments
mwilliams
Hi Timo,
What version of BIRT are you using? I'll try out using the URL absolute path and see what I see for getting it to work for PDF.
iparker
Hello Michael,<br />
<br />
thanks for your answer. It would be great if you could test it. I really become desperate about it...<br />
<br />
I use the birt-version 2.5.1.v20090903.<br />
<br />
One more detail: I want to output images which are stored outside of the document root of the webserver. I posted some more details in <a class='bbc_url' href='
http://www.birt-exchange.org/forum/deploying-integrating-birt-report-engine-applications/19699-problem-image-path-php-javabridge.html?=newpost&t=19699'>http://www.birt-exchange.org/forum/deploying-integrating-birt-report-engine-applications/19699-problem-image-path-php-javabridge.html?=newpost&t=19699</a>
. <br />
<br />
Maybe could another question be: How can I output images with an absolute path on a linux-system?
mwilliams
Timo,<br />
<br />
It looks like there is a bug with the URI images for PDF in 2.5.1, 2.5.2, and 2.6. Could you log a bug for this at <a class='bbc_url' href='
http://www.birt-exchange.org/bug-reporting/?'>Report
Bugs - BIRT Exchange</a><br />
<br />
As another way to do this, have you tried using the "Shared Resource" option and just entering the absolute path there?
iparker
Hello Michael,<br />
<br />
thanks again for your answer. I just posted the bug at <a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314409'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=314409</a>
. <br />
<br />
Could you tell me how I can set an absolute path in the shared resource? Or tell me where I can read something about this topic. Unfortunately I don’t found information about it.<br />
<br />
And do you know how to insert images with an absolute path on a linux-file-system?<br />
<br />
Thanks again!<br />
<br />
Timo
mwilliams
Timo,
When in the image editor, I just chose the "Shared resource" option rather than the URI option. Then, for the expression for the resource file, I simply put the file location: "c:/mwilliams/desktop/" + row["imageName"]
Hope this helps.
For the Linux question, I have Windows, no Linux machine to test on, so I'd be limited to Google searching.
iparker
Hello Michael,
Thanks for your answer. You’re right – with the shared-option and the absolute path value the output works.
So there is just the difficult linux-question open…
Best regards,
Timo