Hi,
Am 29.03.2013 13:30, schrieb Glen Peterson:
To draw a scaled image, you need to use PDPageContentStream.drawXObject()
instead of drawImage() because drawXObject() allows you to pass a width and
height.
http://pdfbox.apache.org/apidocs/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.html#drawXObject(org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject,
float, float, float, float)
Oh yes, sorry my bad. I meant that but didn't write it.
Thanks for the hint Glen!
BR
Andreas Lehmkühler
On Fri, Mar 29, 2013 at 8:05 AM, Andreas Lehmkuehler <andr...@lehmi.de>wrote:
Hi,
Am 28.03.2013 16:32, schrieb Steele, Raymond:
Hello Developers,
I posted this on the user's list, but have not received any feedback.
Hopefully, you can assist.
Sorry for being frankly, but what do you expect? This isn't a 24x7
hotline. We
are all volunteers and you're getting impatient after less than a day.
Saying
that, please avoid double postings.
I am working with images that are 300 dpi. I am trying to arrange them on
a PDDocument,
but I do not know how to change the resolution of the PDPage from 72dpi.
For example,
I have one image that is 300 dpi, 2271 x 449 pixels, 7.57 x 1.567
inches. I would like to add this image to a PDF document, but the
resolution of the PAGE_SIZE_LETTER is
612 x 792 (8.5 x 11 inches). I would like to add the 300 dpi image to
the 8.5 x 11
inch PDF at 300 dpi. Does this make since? Anyone?
You can't change change the resolution of the page, you have top scale your
image to match the pagesize. Have a look at PDPageContentStream#drawImage
how
to do that.
Thanks,
Raymond
BR
Andreas Lehmkühler