Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-740

PDF Replace String



    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Problem
    • 0.7.3
    • None
    • Text extraction
    • Windows Server 8 - 64 Bit version, JDK 1.4.2_16


      Hello Sir,

      We are facing an issue with one of our current requirement which is to read content from one of the PDF document which has some placeholders in it. These placeholders are required to be replaced with new values and the then to save the document in PDF format with these new values. We have looked at the class ReplaceString.java which provides this functionality of replacing a single string in the adobe document, but we will not be able to use this class as we have approx 15 strings to be replaced. We are looking for a functionality which can help us to replace these 15 strings once the file is read and before saving the file with new string values. We have tried the following approach, we looked at the source of ReplaceString.Java file and used the source code to replace the multiple strings, what we have observed during debugging that while reading the document the returned token contains only the random portion of the placeholder string and not the complete word (sometimes it contains first 3 characters of the word and sometimes last 4 characters of the word); we never get the token with complete placeholder word or string. We are using JDK 1.4.2_16 version on 64 bit windows system. Any help to realize the required fucntionality is highly appreciated.

      Thanks and Regards,
      Naga Kishore Vankayala


        1. TestPDFTemplating.java
          8 kB
          Jason Stein



            Unassigned Unassigned
            vnagakishore Naga Kishore Vankayala
            0 Vote for this issue
            2 Start watching this issue