I am writing text from right to left.
how can i add an image at the end of the text (alligned nicely)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The question isn’t entirely clear.
The order of objects added to a Document is always respected, except in the case of
Imageobjects. If anImageobject doesn’t fit the page, it can be forwarded to the next page, and other content can be added first. If you want to avoid this, usewriter.setStrictImageSequence(true);However: you’re writing from Right to Left (probably in Hebrew), so the above doesn’t apply, not the previous answer by Anshu. You can only use RTL in
ColumnTextandPdfPTable.It’s not clear what you want to do.
Do you want to add an
Imageat the bottom of the text? That’s easy: just add the text first, then add theImage. Do you want to add anImageinline? In that case, you can wrap theImagein aChunkas is done in this example: http://itextpdf.com/examples/iia.php?id=54My interpretation is: you want to add the image at the bottom left, and you want the text to be added next to the image. That’s more difficult to achieve. You’d need to add the
Imageand the text separately. Add the Image at an absolute position and add the text using ‘irregular columns’. That is:ColumnTextin text mode (as opposed to composite mode). For an example showing how to use irregular columns, see http://itextpdf.com/examples/iia.php?id=67