logo       

RE: Sizing of a pdf: msg#00061

java.lib.itext.general

Subject: RE: Sizing of a pdf

In iText the reading of images from java.awt.Toolkit is always done by first
converting the image to RGB. Images such as gif use a palette and are a lot
smaller than the expanded RGB result. You can use the classes in
com.lowagie.text.pdf.codec to read all the image types that awt supports
(and some others), in the most efficient way. The next version will have a
way to get all type of images using a single interface in
com.lowagie.text.Image.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Chris Faulkner [SMTP:chrisf@xxxxxxxxxx]
> Sent: Thursday, June 05, 2003 8:35
> To: itext-questions@xxxxxxxxxxxxxxxxxxxxx
> Subject: [iText-questions] Sizing of a pdf
>
> Hello
>
> I have a PDF to which I am adding some imagery. There were initially two
> images in the document, one of which was about 100K and the other about
> 600K. The PDF wass approximately 1.4MB and was composed on only a single
> page with some other text on it. So I have long wondered why the PDF is
> much
> bigger than the two images which go to make it up but I wasn't too
> concerned.
>
> This morning I added a third image ( a 1K PNG ) on top of the larger image
> and the file size shot up to 2MB. Can anyone explain the mechanics of
> this
> internally or advise of a way of keeping the size down ? I am adding the
> images, using java.awt.Toolkit, as outlined in the tutorial in the
> following
> way
>
> Image image =
> Image.getInstance(Toolkit.getDefaultToolkit().createImage("H.gif"), null);
> image.setAbsolutePosition(100, 200);
> cb.addImage(image);
>
> Previously, I was using SVG and Batik to composite the two overlapping
> images but i wanted to remove this and just add the images together with
> iText.
>
> Thanks
>
> Chris
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> iText-questions mailing list
> iText-questions@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise