This might be a bug!
Here is what happend. -->
document.add(new Paragraph("Some text to be added"));
Image image1 = Image.getInstance(byte_array);
image1.setAlignment(Image.MIDDLE);
document.add(image1);//image1 is being generated using an array of raw bytes
//
document.add(new Paragraph("Some text to be added"));
Image image2 = Image.getInstance(byte_array);
image2.setAlignment(Image.MIDDLE);
document.add(image2);//image2 is being generated using an array of raw bytes
//
document.add(new Paragraph("Some text to be added"));
Image image3 = Image.getInstance(byte_array);
image3.setAlignment(Image.MIDDLE);
document.add(image3);//image3 is being generated using an array of raw bytes
//
document.add(new Paragraph("Some text to be added"));
Image image4 = Image.getInstance(byte_array);
image4.setAlignment(Image.MIDDLE);
document.add(image4);//image4 is being generated using an array of raw bytes
//
document.add(new Paragraph("Some text to be added"));
Image image5 = Image.getInstance(byte_array);
image5.setAlignment(Image.MIDDLE);
document.add(image5);//image5 is being generated using an array of raw bytes
//
document.add(new Paragraph("Some text to be added"));
Image image6 = Image.getInstance(byte_array);
image6.setAlignment(Image.MIDDLE);
document.add(image6);//image6 is being generated using an array of raw bytes
...
It works well, until an image is to big to fit into the area at the end of the page.
Then, an image is drawn on the next page, but the Paragraph that should come
after that image is being drawn in front of it, i.e. on the previous page, etc.
I've solved this problem using document.newPage() to prevent that strange behavior.
Is there any other solution?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
