Chart Quality

Dear all,

 

I am using BIRT within KNIME and would like to increase the chart (=image) quality. I have the impression that BIRT is using 96 dpi. For printed reports a higher resoulution would be desirable.

One can find several hints in BIRT Forums (e.g.:

If you are using the Report Engine API
add the dpi to the application context
context.put( EngineConstants.APPCONTEXT_CHART_RESOLUTION, yourneededdpi );


, but I do not know how one can implement these in the KNIME environment.

Thank you very much for any idea, hint......

 

Jürgen

Hi Jürgen,

As of v2.2.2 you'll find the "Script" tab in the report editor as soon as you have the KNIME expert mode enabled. In KNIME v2.3 (to be released next Monday), this tab will always be shown.

Regards,
  Bernd

Thank you very much for your quick reply. I will report on the result...

Best regards,

Jürgen

Dear Bernd,

I just tried as script in the "BeforeFactory"-Method

ReportContext.getAppContext().put("CHART_RESOLUTION",300);

without success (the pdf-document is unchanged..). Do you have any additional idea?

Will KNIME 2.3 use another BIRT version?

Best regards and thank you very much

Jürgen

Try

reportContext.getAppContext().put("CHART_RESOLUTION", "300" );

(The second argument is in quotes and the reportContext starts with a lower 'r'.)

KNIME v2.3 will use BIRT 2.6.1 (KNIME v2.2.2 is based on BIRT 2.3.2).

Regards,
  Bernd

Hello Bernd,

bad luck... your hint did not help.

But I found (and could apply) another way around the issue.

My steps:

1. In KNIME:
File > Preferences > Report Design > Preview
Mark: "Always use external browsers"

2. When preparing the report (e.g. als pdf) the pdf-file will be opened in a browser window

3. The url (used by the browser) looks like:
http://127.0.0.1:59332/viewer/preview?...(some other parameters)....__dpi=300&1927868670&

4. Change the value after _dpi to the desired one

5. And it worked ! (in my case...)

Your approach is by far smarter, perhaps we will find the right "environment" for the script.

Best regards and thank you very much

Jürgen

Hello Jürgen,

if you are still interested there is an easier way to specify the dpi for images contained in reports:

There exists a report property "Image DPI" in the report designer. To find it make sure that no element is selected in the report, go to the "Property Editor - Report" view -> Advanced -> Image DPI.

Best regards,
Dominik


 

Hi Dominik,

sorry for the late reply....

I have checked your approach, but the Image DPI seeting does only influence embedded images (and not charts, even if I set the chart output to png).

So I assume I will stick to the url-approach.

Thank you very much

Jürgen