Resizing images for DOC output does not work [message #1122416] |
Tue, 01 October 2013 14:49 |
Robert Walter Messages: 29 Registered: July 2011 |
Junior Member |
|
|
Hi,
we are using BIRT 4.2.2 and render with runTask + renderTask.
We have the following use case: For our report, we create and new PNG images programmatically right before a report gets created. In BIRT, we check for each image if it exceeds a maximum dimension. If so, we set the size to this maximum.
We do this with a bit of java script and it works fine for HTML and PDF. The code is defined for every image in its "on create" property.
We now added DOC as an output format. Unfortunately, the image resizing does not work for the Word output.
We use basically the same options, resp. I cannot see how the used options should be a reason for that issue:
...
case DOC:
IRenderOption docRenderOption = new RenderOption();
OutputStream docStream = createOutputStream(format);
if (docStream != null) {
docRenderOption.setOutputStream(docStream);
} else {
docRenderOption.setOutputFileName(getOutputFileName(format));
}
docRenderOption.setOutputFormat(getBIRTFormat(format));
docRenderOption.setOption(IRenderOption.HTML_PAGINATION, Boolean.TRUE);
return docRenderOption;
case PDF:
default:
PDFRenderOption pdfRenderOption = new PDFRenderOption();
pdfRenderOption.setOption(IPDFRenderOption.DPI, 96);
OutputStream outputStream = createOutputStream(format);
if (outputStream != null) {
pdfRenderOption.setOutputStream(outputStream);
} else {
pdfRenderOption.setOutputFileName(getOutputFileName(format));
}
pdfRenderOption.setOutputFormat(getBIRTFormat(format));
pdfRenderOption.setOption(IPDFRenderOption.PDF_HYPHENATION, Boolean.TRUE);
pdfRenderOption.setOption(IPDFRenderOption.PDF_TEXT_WRAPPING, Boolean.TRUE);
pdfRenderOption.setOption(IPDFRenderOption.PAGE_OVERFLOW, IPDFRenderOption.FIT_TO_PAGE_SIZE);
return pdfRenderOption;
Does anyone has experienced a similar problem or has an idea what causes this issue?
Thanks!
[Updated on: Tue, 01 October 2013 14:49] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01923 seconds