Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » renderTask images not found when rendering pdf
renderTask images not found when rendering pdf [message #663546] Tue, 05 April 2011 15:05 Go to next message
John Missing name is currently offline John Missing nameFriend
Messages: 513
Registered: July 2009
Senior Member
Rendering pdf I get following exception when calling run and render separately:
org.eclipse.birt.report.engine.util.ResourceLocatorWrapper findResource




Using runAndRender() images are displayed correctly:
        task = engine.createRunAndRenderTask(report);
        IPDFRenderOption options= new PDFRenderOption();
        options.setOutputFormat(format.toString());
        options.setSupportedImageFormats("JPG;PNG;BMP;SVG;GIF");
        options.setOutputStream(output);
        task.setRenderOption(options);
        task.run();


But I had to call call run and render separately, oherwise pagenumbers aren't calculated correctly.
So I changed my code:
        runTask = engine.createRunTask(report);
        rptdocument = (File.createTempFile("birt", ".rptdocument")).getCanonicalPath();
        runTask.run(rptdocument);

        IReportDocument rptdoc = engine.openReportDocument(rptdocument);
        renderTask = engine.createRenderTask(rptdoc);
        IPDFRenderOption options= new PDFRenderOption();
        options.setOutputFormat(format.toString());
        options.setSupportedImageFormats("JPG;PNG;BMP;SVG;GIF");
        options.setOutputStream(output);
        renderTask.setRenderOption(options);
        renderTask.render();


Now the pagenumbers are calculated correclty. By my image isnt't displayed. I get the above exception.
I put an image in the masterpage in a rptlibrary. The image file is an "image file in shared resources" (a jpg in the same directory as the rptlibrary).

I also tried an own IResourceLocator - this resourcelocator is called correctly when rptlibrary is searched, but there's no call for my image.

Setting an imagehandler (options.setImageHandler(myownimagehandler)) has no effect - none of the methods are called.

What shall I do?
Any suggestions?
Re: renderTask images not found when rendering pdf [message #900931 is a reply to message #663546] Thu, 09 August 2012 07:08 Go to previous messageGo to next message
André Schade is currently offline André SchadeFriend
Messages: 5
Registered: August 2012
Junior Member
Hello,

I have the same problem. Has anyone an idea???

Thanks,
André
Re: renderTask images not found when rendering pdf [message #900989 is a reply to message #900931] Thu, 09 August 2012 10:40 Go to previous message
John Missing name is currently offline John Missing nameFriend
Messages: 513
Registered: July 2009
Senior Member
see http://www.birt-exchange.org/org/forum/index.php/topic/22012-irendertask-pdf-images-not-found/page__s__66b76092bee20c50b802f5a0144744c1
Previous Topic:Call Oracle Function from Eclipse BIRT (2.6.1)
Next Topic:Using JDBC for datasource not showing all of Schema
Goto Forum:
  


Current Time: Thu Apr 25 04:55:49 GMT 2024

Powered by FUDForum. Page generated in 0.02956 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top