Thanks Paulo!

I used Image.scalePercent(int) and all is well.

Thanks for sharing your genius.

- Dirk

------------------------------------------
Dirk Townsend, GIS Analyst, TerraViva Inc.
[EMAIL PROTECTED]
416.533.2589 in Toronto, Canada


---------- Original Message -----------
From: "Paulo Soares" <[EMAIL PROTECTED]>
To: "Dirk Townsend" <[EMAIL PROTECTED]>, <itext-questions@lists.sourceforge.net>
Sent: Tue, 1 Mar 2005 08:52:37 -0000
Subject: Re: [iText-questions] Image.setDpi

> 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
------- End of Original Message -------



-------------------------------------------------------
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

Reply via email to