|
Re: Decreasing image quality in PDF-Export [message #882121 is a reply to message #882026] |
Tue, 05 June 2012 22:22 |
|
Take a look at this :
http://www.eclipse.org/birt/phoenix/project/notable2.5.php#jump_16
Also set the height and width for the image to blank and then set the
advanced property for dpi. You may also want to look at the fit to
container to put your image in a grid cell that is sized smaller than
your image.
Jason
On 6/5/2012 12:49 PM, Thomas Thym wrote:
> Hi,
>
> I have written a report generating a price list with images of the
> product. The pictures have a resolution of 300 dpi. The exported
> PDF-file goes to the printer. The 50MB file is too big for the download
> from the internet. (The internet version is individual for each customer
> with individual prices.)
>
> My aim is to reduce the resolution of the report to 96 dpi. I searched
> the internet and found some hints.
> I tried the following things with no effect.
>
> 1. Properties -> Advanced -> Image DPI -> set to 96
>
> 2. Add a script to "beforeRender"
> reportContext.getAppContext().put(
> EngineConstants.APPCONTEXT_CHART_RESOLUTION, 96 );
> [This one might only work for charts, not for images, but I tried it.]
>
> 3. Add a script to "beforeRender"
> var options = new PDFRenderOption();
> options.setOption(IPDFRenderOption.DPI, 96);
>
> ... and many variations.
>
> If would be great if you could give me some hints where I could look into.
>
> Thomas
>
> P.S.: I use birt-rcp-report-designer 3.7.2
>
|
|
|
Re: Decreasing image quality in PDF-Export [message #882125 is a reply to message #882121] |
Tue, 05 June 2012 22:27 |
|
BTW if you are using charts and you want the pdf smaller make sure to
set the chart type to something like png. SVG produces better image
quality on charts but larger pdfs.
Jason
On 6/5/2012 6:22 PM, Jason Weathersby wrote:
>
> Take a look at this :
> http://www.eclipse.org/birt/phoenix/project/notable2.5.php#jump_16
>
> Also set the height and width for the image to blank and then set the
> advanced property for dpi. You may also want to look at the fit to
> container to put your image in a grid cell that is sized smaller than
> your image.
>
> Jason
>
> On 6/5/2012 12:49 PM, Thomas Thym wrote:
>> Hi,
>>
>> I have written a report generating a price list with images of the
>> product. The pictures have a resolution of 300 dpi. The exported
>> PDF-file goes to the printer. The 50MB file is too big for the download
>> from the internet. (The internet version is individual for each customer
>> with individual prices.)
>>
>> My aim is to reduce the resolution of the report to 96 dpi. I searched
>> the internet and found some hints.
>> I tried the following things with no effect.
>>
>> 1. Properties -> Advanced -> Image DPI -> set to 96
>>
>> 2. Add a script to "beforeRender"
>> reportContext.getAppContext().put(
>> EngineConstants.APPCONTEXT_CHART_RESOLUTION, 96 );
>> [This one might only work for charts, not for images, but I tried it.]
>>
>> 3. Add a script to "beforeRender"
>> var options = new PDFRenderOption();
>> options.setOption(IPDFRenderOption.DPI, 96);
>>
>> ... and many variations.
>>
>> If would be great if you could give me some hints where I could look
>> into.
>>
>> Thomas
>>
>> P.S.: I use birt-rcp-report-designer 3.7.2
>>
>
|
|
|
|
|
Re: Decreasing image quality in PDF-Export [message #882654 is a reply to message #882306] |
Wed, 06 June 2012 23:29 |
|
Thomas,
I was able to get the image to scale down but the pdf size had very
little difference. Take a look at the attached example. Change the dpi
to something like 300 and then back to 96.
Jason
On 6/6/2012 4:15 AM, Thomas Thym wrote:
> I read the document and tried a couple of things.
>
> In the viewer the image remains at the large scale and is cut at the end
> of the container (only width is defined, the hight should be automatic
> according to the proportional value of the image).
>
> In the PDF the image has the right dimensions 5 cm wide, but the
> resolution remains the same.
>
> I tried:
>
> Image: - Proportional scale: true/false
> - Fit to container: true/false
> - width: blanc (setting the width is showing the image in the right size
> but the resolution is too high; according to your link the width should
> be empty)
>
> Container (Grid): - Can shrink: true/false
> - width 5 cm - hight (3 in) => no effect.
> - Display: Block / Inline
>
> Container (Column of grid): - Can shrink: true/false
> - width: 5 cm / 40 mm / 3 in / blanc
>
> Container (Row of grid): - hight: 4 in => image is cut at 4in, not
> scaled in the viewer.
>
> Report:
> - Image DPI: 0 / 96 / 120
>
> Thanks for your help.
> Thomas
>
-
Attachment: ImageDPI.zip
(Size: 9.77KB, Downloaded 921 times)
|
|
|
|
Re: Decreasing image quality in PDF-Export [message #884729 is a reply to message #884721] |
Mon, 11 June 2012 17:27 |
|
Thomas,
Thanks for the update. Any chance you could log a bugzilla entry to
improve the behavior?
Jason
On 6/11/2012 1:14 PM, Thomas Thym wrote:
> Hi Jason,
>
> thank you very much for your efforts. I tried your example and
> experimented with an own image (higher resolution) but had no success.
> The variation of the filesize went away when I deleted the footer in the
> master page (date, time).
>
> I succeeded in keeping the image size the same, but I had no success
> reducing the image resolution (in the PDF).
>
> As workaround I will have two directories of the images. One with 96 dpi
> and the other with 300 dpi. According to a parameter setting BIRT will
> fetch the images from one of those directories.
>
> Thanks for your help.
>
> Thomas
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04225 seconds