[ 
https://issues.apache.org/jira/browse/PDFBOX-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maruan Sahyoun resolved PDFBOX-740.
-----------------------------------

    Resolution: Not A Problem

In order to replace a string actions must be taken if the string is separated 
into multiple pieces within the pdf which is totally valid. As such the 
ReplaceString.java code is a simplified example of how one could replace a 
string within a PDF.
                
> PDF Replace String
> ------------------
>
>                 Key: PDFBOX-740
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-740
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Text extraction
>    Affects Versions: 0.7.3
>         Environment: Windows Server 8 - 64 Bit version, JDK 1.4.2_16
>            Reporter: Naga Kishore Vankayala
>            Priority: Critical
>              Labels: PDF, Read, Replace, String
>         Attachments: TestPDFTemplating.java
>
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to