hi all.

my application connects to a db and read orders from it.
each order contains an image and its width and height (in cm).

i'm trying to resize the image so it will be printed in the same size as
stored in the order.

here's what i did:
Image bgimg = Image.getInstance(imgurl);
float width, height;
width = new Float(m_pattern.getWidth() * bgimg.getDpiX() / 2.54);
height = new Float(m_pattern.getHeight() * bgimg.getDpiY() / 2.54);
bgimg.scaleAbsolute(width, height);
document.add(bgimg);

in the pdf that i get from this the image is larger than it should be.. it's
even larger than the original size.

any ideas?

thanks!
-- 
View this message in context: 
http://www.nabble.com/resizing-images.-tf3526406.html#a9839122
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to