Thanks for your response!
The image is definitely not bigger than the page (it's 100x100
pixels). There are several images on the page and it's just the last
one that gets lost if it happens to be close to the bottom. If the
text fills up the entire page then sometimes the image at the bottom
does get pushed to the new page. I tried adding the
PdfWriter.setStrictImageSequence(true) line right before I close the
document (I'm not sure if that's the right spot...I'm a novice at
this; adding it to the top gave me a null pointer exception).
Thanks again,
Malgosia Green
Savvica Inc.
[EMAIL PROTECTED]
Canada (416) 907-8618
UK +44 (0) 20 7993 2895
Fax (416) 907-8677
www.savvica.com
On 28-Jul-05, at 11:52 AM, Paulo Soares wrote:
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