Reputation: 5282
We are currently migrating from Aspose.PDF to iText. After migrating all legacy Aspose code only the replacing of plain text in an existing PDF is left and after reading several tutorials and the examples page on http://itextsupport.com/ I still don't get how to replace a text in PDF.
To make it more specific:
There is a base PDF which contains text and parts of this text shall be replaced or removed. Not only visually but as well on a meta-level. In Aspose there is something called PdfContentEditor
which achieve exactly this. For me it is not important if the actual PDF is modified or if a new PDF based on the base PDF and the modification is created.
Anyone out there who did this already with iText?
Upvotes: 0
Views: 571
Reputation: 9057
That's not possible. Why?
Suppose you wanted to replace the word "alpha" with "the first item". Then you would expect all items in the same line to reflow. But (see earlier), the document simply doesn't have the information to know what belongs on the same line. Nor is it trivial to determine what elements belong together.
Upvotes: 2