You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Hendrik Ewerlin <es...@gmx.de> on 2013/01/19 21:07:18 UTC

PDF Image Resoultion?

Hi everybody,

I'm rendering an image using the PDPageContentStream.drawImage method.
Unfortunately the image resolution is very bad so it shows big pixels.
How can I increase the resolution?

Thanks in advance...
Hendrik Ewerlin

Re: PDF Image Resoultion?

Posted by Hendrik Ewerlin <es...@gmx.de>.
Thanks for the reply.
I was actually able to fix the problem by using drawXObject with reduced 
width and height! :-)
Thanks.

Hendrik

Am 20.01.2013 01:26, schrieb Eliot Kimber:
> I've just been through this.
>
> The resolution is a function of the number of pixels in the image you're
> placing, so if it the resolution is bad in the PDF it means the image is low
> resolution--there's nothing you can do to fix that except to place it in a
> smaller area on the page. But if the image has a low pixel count I would
> expect to be small on the page if you're using drawImage as drawImage() uses
> the pixel size of the image to determine the PDF width (at least that's the
> result I was getting for the images I was placing).
>
> You can use drawXObject() and specify the optional width and height
> parameters to specify the width in the PDF the image will be given.
>
> How are you creating the image?
>
> Cheers,
>
> Eliot
>
> On 1/19/13 2:07 PM, "Hendrik Ewerlin"<es...@gmx.de>  wrote:
>
>> Hi everybody,
>>
>> I'm rendering an image using the PDPageContentStream.drawImage method.
>> Unfortunately the image resolution is very bad so it shows big pixels.
>> How can I increase the resolution?
>>
>> Thanks in advance...
>> Hendrik Ewerlin


Re: PDF Image Resoultion?

Posted by Eliot Kimber <ek...@rsicms.com>.
I've just been through this.

The resolution is a function of the number of pixels in the image you're
placing, so if it the resolution is bad in the PDF it means the image is low
resolution--there's nothing you can do to fix that except to place it in a
smaller area on the page. But if the image has a low pixel count I would
expect to be small on the page if you're using drawImage as drawImage() uses
the pixel size of the image to determine the PDF width (at least that's the
result I was getting for the images I was placing).

You can use drawXObject() and specify the optional width and height
parameters to specify the width in the PDF the image will be given.

How are you creating the image?

Cheers,

Eliot

On 1/19/13 2:07 PM, "Hendrik Ewerlin" <es...@gmx.de> wrote:

> Hi everybody,
> 
> I'm rendering an image using the PDPageContentStream.drawImage method.
> Unfortunately the image resolution is very bad so it shows big pixels.
> How can I increase the resolution?
> 
> Thanks in advance...
> Hendrik Ewerlin

-- 
Eliot Kimber
Senior Solutions Architect, RSI Content Solutions
"Bringing Strategy, Content, and Technology Together"
Main: 512.554.9368
www.rsicms.com
www.rsuitecms.com
Book: DITA For Practitioners, from XML Press,
http://xmlpress.net/publications/dita/practitioners-1/