Skip to content
Advertisement

Editing PDF text using Java

Is there a way I can edit a PDF from Java?
I have a PDF document which contains placeholders for text that I need to be replaced using Java, but all the libraries that I saw created PDF from scratch and small editing functionality.
Is there anyway I can edit a PDF or is this impossible?

Advertisement

Answer

You can do it with iText. I tested it with following code. It adds a chunk of text and a red circle over each page of an existing PDF.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement