Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » PDF and image
PDF and image [message #655549] Mon, 21 February 2011 17:42 Go to next message
Nicola is currently offline NicolaFriend
Messages: 184
Registered: July 2009
Senior Member
Hi,
using BIRT 2.6.0 I noticed that a report cotaining a PNG file as logo is
embedded in a PDF which results with a bad quality.
Is it matter of source file (PNG, maybe it's better using a JPG) or it's
a problem related to pdf renderer?

Thank you,
Nicola
Re: PDF and image [message #655565 is a reply to message #655549] Mon, 21 February 2011 18:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Nicola,

There is an advanced property for the report name Image DPI. Have you
tried to change it? Try a value of 300

Jason

On 2/21/2011 12:42 PM, nicola wrote:
> Hi,
> using BIRT 2.6.0 I noticed that a report cotaining a PNG file as logo is
> embedded in a PDF which results with a bad quality.
> Is it matter of source file (PNG, maybe it's better using a JPG) or it's
> a problem related to pdf renderer?
>
> Thank you,
> Nicola
Re: PDF and image [message #658285 is a reply to message #655565] Mon, 07 March 2011 17:28 Go to previous messageGo to next message
Nicola is currently offline NicolaFriend
Messages: 184
Registered: July 2009
Senior Member
Hi,
If I try 300, the PDF resolution become higher and all the contain smaller.
The image is the same.

Nicola

Jason Weathersby ha scritto:
> Nicola,
>
> There is an advanced property for the report name Image DPI. Have you
> tried to change it? Try a value of 300
>
> Jason
>
> On 2/21/2011 12:42 PM, nicola wrote:
>> Hi,
>> using BIRT 2.6.0 I noticed that a report cotaining a PNG file as logo is
>> embedded in a PDF which results with a bad quality.
>> Is it matter of source file (PNG, maybe it's better using a JPG) or it's
>> a problem related to pdf renderer?
>>
>> Thank you,
>> Nicola
>
Re: PDF and image [message #658442 is a reply to message #658285] Tue, 08 March 2011 14:46 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Nicola

How are you running the report?

Jason
Re: PDF and image [message #658746 is a reply to message #655549] Wed, 09 March 2011 16:26 Go to previous messageGo to next message
Martin Schmitz is currently offline Martin SchmitzFriend
Messages: 23
Registered: July 2009
Junior Member
I have the same problem. I understand the problem with the images, but how to improve the quality of charts in pdf. As I understand they are not touched by the

<property name="imageDPI">300</property>

property. I am using the default web viewer.
Re: PDF and image [message #658757 is a reply to message #658746] Wed, 09 March 2011 17:07 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Add &__dpi=300 to the url for the viewer. Make sure it is not already
in the url. This will set the appcontext chart resolution variable.

Jason

On 3/9/2011 11:26 AM, Martin Schmitz wrote:
> I have the same problem. I understand the problem with the images, but
> how to improve the quality of charts in pdf. As I understand they are
> not touched by the
> <property name="imageDPI">300</property>
>
> property. I am using the default web viewer.
Re: PDF and image [message #658760 is a reply to message #658757] Wed, 09 March 2011 17:12 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You can also add this to the beforeRender script

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

Jason

On 3/9/2011 12:07 PM, Jason Weathersby wrote:
> Add &__dpi=300 to the url for the viewer. Make sure it is not already
> in the url. This will set the appcontext chart resolution variable.
>
> Jason
>
> On 3/9/2011 11:26 AM, Martin Schmitz wrote:
>> I have the same problem. I understand the problem with the images, but
>> how to improve the quality of charts in pdf. As I understand they are
>> not touched by the
>> <property name="imageDPI">300</property>
>>
>> property. I am using the default web viewer.
>
Re: PDF and image [message #658766 is a reply to message #655549] Wed, 09 March 2011 17:54 Go to previous messageGo to next message
Martin Schmitz is currently offline Martin SchmitzFriend
Messages: 23
Registered: July 2009
Junior Member
Hi Jason,

thanks for your response. I will try that out tomorrow. Isn't there a general parameter in the webviewer app, that can be set. Best would be a parameter in a property file or web.xml.

Thanks
Martin
Re: PDF and image [message #658778 is a reply to message #658766] Wed, 09 March 2011 18:13 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The url parmaeter __dpi

Jason

On 3/9/2011 12:54 PM, Martin Schmitz wrote:
> Hi Jason,
>
> thanks for your response. I will try that out tomorrow. Isn't there a
> general parameter in the webviewer app, that can be set. Best would be a
> parameter in a property file or web.xml.
>
> Thanks
> Martin
Re: PDF and image [message #658783 is a reply to message #658778] Wed, 09 March 2011 18:41 Go to previous messageGo to next message
Martin Schmitz is currently offline Martin SchmitzFriend
Messages: 23
Registered: July 2009
Junior Member
But I have to set the parameter creating the complete URL for calling the report.
I would like to call only with the report as parameter and would like to set the dpi inside the webapp as default without touching the url.

I can't find a documentation about the webviewer. I will checkout the soruce and have a look at this.
Re: PDF and image [message #658908 is a reply to message #655549] Thu, 10 March 2011 12:19 Go to previous messageGo to next message
Martin Schmitz is currently offline Martin SchmitzFriend
Messages: 23
Registered: July 2009
Junior Member
Hello,

I found a solution for my problem. Perhaps I have to say, that I am using the default webviewer application.

@Jason: The parameter works fine, but when I think it has to be variable depending on the output. When setting the parameter to 300, PDF looks fine, but HTLM does not.

So I took the sourcecode of the webviewer and changed the followong in the class ParameterAccessor

public static Number getDpi(HttpServletRequest request) {
		String dpi = getParameter(request, PARAM_DPI);
		if ("pdf".equalsIgnoreCase(request.getParameter("__format"))) {
			return 300;
		}
		if (dpi == null || dpi.trim().length() <= 0)
			return null;
		return Integer.valueOf(dpi);
		
}
Re: PDF and image [message #658985 is a reply to message #658908] Thu, 10 March 2011 15:44 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Looks good Martin.

Jason

On 3/10/2011 7:19 AM, Martin Schmitz wrote:
> Hello,
>
> I found a solution for my problem. Perhaps I have to say, that I am
> using the default webviewer application.
>
> @Jason: The parameter works fine, but when I think it has to be variable
> depending on the output. When setting the parameter to 300, PDF looks
> fine, but HTLM does not.
>
> So I took the sourcecode of the webviewer and changed the followong in
> the class ParameterAccessor
>
>
> public static Number getDpi(HttpServletRequest request) {
> String dpi = getParameter(request, PARAM_DPI);
> if ("pdf".equalsIgnoreCase(request.getParameter("__format"))) {
> return 300;
> }
> if (dpi == null || dpi.trim().length() <= 0)
> return null;
> return Integer.valueOf(dpi);
>
> }
>
Previous Topic:line breaks in pdf ?
Next Topic:BIRT Output horizontally
Goto Forum:
  


Current Time: Thu Apr 25 15:36:04 GMT 2024

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

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

Back to the top