The ReplaceText example is somewhat naïve.  It only works when text is

contiguous in the PDF document.

 

This text can be intermingled with formatting, etc.  So, simply finding text

is pretty complicated.  

 

     In addition, the example code does not work well when the new string is

a different length than the string being replaced.  The text positions are

all messed up in this case.

 

     It would be really cool if PDFBox provided a robust replaceText method

that handles these details.  

 

                                                                     Alan

 

 

Reply via email to