I have a problem formatting a PDF with iText for java (version 5.3.2).
My document should look like this:
text1word1 text1word2 text1word3. -- *** | ----------- | | image 1 | | ----------- |- page 1 *** | *** | text2word1 text2word2 text2word3. | *** -- ----------- -- | image 2 | | ----------- | *** | *** |- page 2 text3word1 text3word2 text3word3. | *** | ----------- | | image 3 | | ----------- --
* = space
But after adding all the elements one by one, I get something like this:
text1word1 text1word2 text1word3. -- *** | ----------- | | image 1 | | ----------- |- page 1 *** | *** | text2word1 text2word2 text2word3. | *** -- ----------- -- | image 2 | (where is all my space here gone??) ----------- <----/ | text3word1 text3word2 text3word3. |- page 2 *** | ----------- | | image 3 | | ----------- --
* = space
The problem only occurs if the image is the first object of a new page!
Images are screenshots that are scaled to fit 385x500 pixels. Texts and screenshots spread over several pages. I already tried to fill paragraphs, tables and blank images to force space ... nothing has worked so far ...
source share