The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

simoneffe (12) [Avatar] Offline
#1
Hi, and good Morning
I must create a file .RTF from my JTextPane, all peaple advise me to use iText, but my problem is: HOW? I not found example for this argument. In JTextPAne there are the images and the text in my pane can be greater of one page; then my RTF will have to contain the images and it be format of many pages. Con you help me? Can you indicate me some example for this argument?
Thanks so much
Simone
blowagie (284) [Avatar] Offline
#2
Re: RTF from JTextPane
The advice you were given is wrong.
iText has a class PdfGraphics2D that allows you to write Swing components to PDF as if you were taking a screen shot, but this only goes for PDF, not for RTF.
You'll have to find another way to achieve what you want.