public class ImageTest {
        public static void main(String[] args) {
                new ImageTest();
        }

        public ImageTest() {
                try {
                        Document doc = new Document(PageSize.LETTER, 36,
36, 36, 36);
                        PdfWriter.getInstance(doc, new
FileOutputStream("C:/TEMP/test.pdf"));
                        doc.open();

                        Image image =
Image.getInstance("lib/Scorecard96.tif");
                        image.scalePercent(72f / image.getDpiX() * 100,
72f / image.getDpiY() * 100);
                        image.setSpacingAfter(72);
                        image.setAlignment(Image.RIGHT);
                        doc.add(image);
                        doc.add(image);

                        doc.add(new Paragraph("I did
image.setSpacingAfter(72) on the above images, yet there's almost no gap
between it and this text?"));
                        doc.close();
                        System.out.println("DONE");
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }
}

Now serving Boiler Spirit with every purchase. Switch to the new Purdue debit 
card today. Show your pride and earn Scorecard Rewards on the side. Just sign 
for your purchases and score valuable rewards points you can use for travel, 
electronics or even cash. 



***This is a transmission from Purdue Employees Federal Credit
Union (PEFCU) and is intended solely for its authorized
recipient(s), and may contain information that is confidential
and or legally privileged.  If you are not an addressee, or the
employee or agent responsible for delivering it to an addressee,
you are hereby notified that any use, dissemination,
distribution, publication or copying of the information 
contained
in this email is strictly prohibited. If you have received this
transmission in error, please notify us by telephoning (765)
497-3328 or returning the email. You are then instructed to
delete the information from your computer.  Thank you for your
cooperation.***


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to