Pepijn Schmitz schrieb:
Andreas Lehmkühler wrote:
Pepijn Schmitz schrieb:
The question is: how can I find out from a PDF at which aspect ratio to
display an embedded fax-originated TIFF?
Pictures are saved in their original format. The scaling is done by
the pdf. If you insert a graphic as PDXObject to a page you have to
mention the starting coordinates and the scaling of both axes relative
to their original size.
This means that you have to extract the picture and you have to get
the scalingfacros from the corresponding XObject.
Thanks for the info! I have some more questions now:
How do I get the scaling factors for the image? The image in question is
contained in a PDXObjectImage object, and that class has a width and a
height property, is that what you are referring to? Unfortunately the
I have a look at the sourcecode and I realized that I was wrong. You
don't have to put in the scaling factors, you have to use the width and
the height. The image is automatically scaled from its original size to
that one you put into the method PDPageContentStream.drawXObject
Sorry for that mistake.
But now it's clear what you have to do. Just get the width and the
height from the XObject and you have all you're looking for.
Javadoc fails to mention in what units the width and height are
specified, do you happen to know the units of these properties?
The unit is pixel based on the size of the pdf-page.
Andreas
--
Auf der Verpackung stand "benötigt Windows 9x/2000/XP oder BESSER", also
habe ich Linux installiert.