The dpi is just an information, you have to do the scaling yourself. ----- Original Message ----- From: "Dirk Townsend" <[EMAIL PROTECTED]> To: <itext-questions@lists.sourceforge.net> Sent: Tuesday, March 01, 2005 2:36 AM Subject: [iText-questions] Image.setDpi
> > Hello, > > I've just started using iText, but I'm having trouble with the setDpi > method. It doesn't seem to have any effect at all in the code extract > below: > > Document document = new Document(PageSize._11X17.rotate(),15,15,15,15); > try { > PdfWriter writer = PdfWriter.getInstance(document, new > FileOutputStream("c:\\mndm\\Tabloid.pdf")); > document.open(); > Image img = > Image.getInstance("c:\\mndm\\plot-images\\MapPlot_Tabloid.png"); > img.setDpi(300,300); > document.add(img); > document.close(); > } > catch (Exception de) { > de.printStackTrace(); > > I would assume as I vary the DPI the relative size of my PNG image in > the PDF would vary. It always stays the same. > > I have tried iText 1.2 and 1.2.3. > > Thanks in advance for any replies. > > - Dirk > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions