Hi, i'm new with this library, so i hope that you could help me, i use the
next code to create a simple PDF doc that contains only an image that i have
with an specific size, but when I print the doc, the image size is
differente than the size that i have predefined, and i can´t understand
why?, can you help me please?


import com.itextpdf.text.Document;
import com.itextpdf.text.Image;
import com.itextpdf.text.pdf.PdfWriter;

import java.io.FileOutputStream;

public class ImageExample {
  public static void main(String[] args) {
    Document document = new Document();

    try {
        PdfWriter.getInstance(document,
                new
FileOutputStream("C:\\Users\\Pepe\\Desktop\\Image.pdf"));
        document.open();

        Image image1 =
Image.getInstance("C:\\Users\\Pepe\\Desktop\\rfc.jpg");
        //image1.get
        document.add(image1);
        document.close();
    } catch(Exception e){
      e.printStackTrace();
    }
  }
}

Thanks
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to