If the image is bigger than the the page it's lost. To keep the text-image
sequence call PdfWriter.setStrictImageSequence(true).

----- Original Message ----- 
From: "Malgosia Green" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 28, 2005 4:37 PM
Subject: [iText-questions] Images problem


> Hi,
>
> I'm having problems with disappearing images when creating pdfs.  I
> can get images to show up just fine, except if the image happens to
> be at the bottom of the pdf page.  Specifically, if the image does
> not fit on the page and a new page needs to be created.  Furthermore,
> if text fills up the first page completely, then the image does get
> created on the second page. Otherwise the image seems to be caught in
> a "black hole".   I am using the following code to add the image:
>
>
>          ByteArrayOutputStream baos = new ByteArrayOutputStream();
>          Document document = new Document();
>          PdfWriter writer=null;
>
> ......
>
>                          com.lowagie.text.Image imagepdf =
> com.lowagie.text.Image.getInstance(url);
>
>                          imagepdf.setAlignment((imagebean.getAlign
> ())-1);
>                          imagepdf.setSpacingAfter(20);
>                          Paragraph para = new Paragraph ();
>                          para.add (imagepdf);
>                          document.add(imagepdf);
>
>
> I have tried adding the image to the document directly to no avail.
>
> I am using Struts 1.2.4 within the Eclipse environment and Java 1.5.
> Please let me know if you need more details.
>
> Thank you!!!
>
> Malgosia Green
> Savvica Inc.
> [EMAIL PROTECTED]
> Canada (416) 907-8618
> UK +44 (0) 20 7993 2895
> Fax (416) 907-8677
> www.savvica.com
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
September
> 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to