This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PDF to Editable Format(RTF/HTML) & back to PDF

 
ravi D shankar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Sorry if this question doesnt belong to this sub-forum.
I am working on an issue which had a PDF file generated using iText.
The pdf file contains only formatted text and the requirement is to edit (add/remove content) from the PDF. For this purpose I was thinking whether this is possible using any free java api. I was looking at Google Docs where a document can be saved as a PDF again.
Using iText I think I can generate RTF(also HTML minus the pagebreaks etc) but is it possible to convert it back to PDF with same formatting of text.
Just wanted to buzz people to know whether something like this is possible.

Thanks in advance
Ravi
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically, no. Very few operations are possible on PDF files once they are generated. Adobe Acrobat Professional can perform some editing, but there's no public API -free or commercial- for this.
 
moto raja
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravi,


I have, in fact, tweaked into the source code of and was successful in using the OpenOffice2.1 framework API to convert RTF/Word etc. documents into a pdf document on the fly..
It provides for a proper-formatting and conversion from any of the readalbe formats like text, word-docs etc into pdf without using acrobat reader.

You may as well try the same.

Let me know if you need further help.

Regards,
Moto.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by moto raja:
I have, in fact, tweaked into the source code of and was successful in using the OpenOffice2.1 framework API to convert RTF/Word etc. documents into a pdf document on the fly.


The question is about editing an existing PDF document, so this approach does not help, as OO can not open PDF documents.
 
moto raja
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dittmer,

I'm pretty sure that OO can open pdf documents.
I have a version of OO Installable on my machine and I just opened a pdf doc.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by moto raja:
I'm pretty sure that OO can open pdf documents.
I have a version of OO Installable on my machine and I just opened a pdf doc.

I stand corrected. That's impressive on OO's part. Is it possible to edit the document, or to save to an editable format? That's really what is being asked here.
 
Joe Ess
Bartender
Posts: 9300
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by moto raja:
I have a version of OO Installable on my machine and I just opened a pdf doc.


That's news to me. I just tried to open a PDF with 2.2.0 on Ubuntu Linux and 2.2.1 on WinXP and they both opened the PDF as a source file (i.e. plain ASCII text) not as a rendered document. In any case, OpenOffice will not allow you to edit a PDF and save it (AFAIK).
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what NeoOffice does on my OS X (opening the ASCII source), but I wasn't sure if OO might be doing something more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic