Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Itext generate output in Text format (2.1.4 jar version)  RSS feed

 
lekurwale amol
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using 2.1.4 jar version of iText to generate output in PDF format. I also need to display the same ( the data) in plain text format.
Please let me know if it is possible? If it is, how? If not, suggest suitable API for generating plain text output.

Regards,
Amol
 
lekurwale amol
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, will it be practical to do so? Instead, what if I use RTF format? The newer version of itext seems to have RTF api, but this 2.1.4 does not seem to have one. Please comment on this too.

Regards,
Amol
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iText 2.1.7 (which you should use instead of 2.1.4) does have RTF capabilities, but it's in a separate jar file that can be downloaded in the same place as the PDF jar.

While iText does not have text output, there are various libraries that will extract text from a PDF, or you can create RTF thorugh iText - from which it's fairly simple to extract the raw text.
 
lekurwale amol
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,

Due to some reasons, I cannot replace the jar file. Please let me know more about the liabraries which extract raw text from pdf. One more thing : The client requires text and not RTF.

Regards,
Amol
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please let me know more about the liabraries which extract raw text from pdf.

The AccessingFileFormats page points to several such libraries.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!