zoharat wrote:
> I did try it, but it scales the images down randomly.

That's ONLY true if you use random number for the percentages.

> Let say I said scale to 20% then for a big image it will be okay, but for
> smaller images they get very small.

Hey, that's not random!
If you take 20% of 100, then you get 20.
If you take 20% of 1000, then you get 200.
200 is 10 times more than 20 because 1000 is ten times more than 100.
There's no randomness at all.

> Also if you have multipage images, they get put on the same page.

Is that a problem?
Why aren't you using newPage() if you want the next
image to be on the next page?

> If the image size is greater than the PDF document borders only then do I
> want to make it small.

Than why don't you use scaleToFit()?

> Is there some sort of math behind it?

Yes, but the math is that elementary that it doesn't need explaining.

> How do I get the PDf document borders?

Define "borders":
do you mean the MediaBox, the CropBox, the area inside the margins?

> Also for certain group3 tiff's the images appeared skewed due to the
> difference in the X and Y dpi.

Are you scaling the X and Y differently?

> When I create a document for putting images in them, do I need to do this
> Document doc = new Document(Image) ?

Have you read any documentation at all?

> If I don't then the image is surely getting cut off.

Please take a few steps back AND READ THE DOCUMENTATION.

The quality of your questions makes the quality of our
documentation look very poor. As I wrote the documentation,
I'm not very pleased with your behavior.

br,
Bruno

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to