Check if the pixels are square with Image.getDpiX() and Image.getDpiY().
Best Regards,
Paulo Soares
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 17, 2002 14:38
Subject: [iText-questions] Images getting stretched
>
> Hi,
>
> When i try to insert an image into a pdf it's getting stretched , how do
> i
> avoid id ?
> Here's my code , i have attached the sample png image too , please do
> help
> me out .
>
>
> com.lowagie.text.Document document = new
> com.lowagie.text.Document();
> try {
> PdfWriter.getInstance(document, new FileOutputStream("c:
> \\temp\\test1.pdf"));
>
>
>
> document.open();
> com.lowagie.text.Image png =
> com.lowagie.text.Image.getInstance
> ("c:\\temp\\test.png");
> document.add(png);
> } catch (DocumentException de) {
> System.err.println(de.getMessage());
> } catch (IOException ioe) {
> System.err.println(ioe.getMessage());
> }
> document.close();
>
> (See attached file: test.png)
> regards
>
> Debasish Sahu.
> Senior Software Engineer
> RMS India.
> A-7,Sector-16
> Noida-201301.
> Uttar Pradesh.India.
> Phone : +91-118-4511102
> Fax : +91-118-4511109
> Website : http://www.rmsinet.com
>
>
-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions