1

Hi i am creating a pdf with texts and images. If the text is too big the pdf being created comes into 2nd page. Is there a way i can restict the content to a single page. I am ok trimming the end of the text,but is there an event method in droidtext api which can notify when i reach end of page.

Regards,

Deva
  • 3,919
  • 1
  • 27
  • 38

1 Answers1

2

You can listen to page events by using Document.addDocListener() which will notify you when a new page is added. To force that a paragraph is kept on one page you can use Paragraph.setKeepTogether()