I just added this

        //to display so lets update that operator
                            Object previousO = tokens.get( j-1 );

                           String prev= tokens.get( j-1 ).toString();

                            COSString previous = (COSString) previousO;

                            String string = previous.getString();
    ------>                       System.out.println(string);
                            string = string.replace(  "##VERSION##", "test" );
                            previous.reset();


-----Ursprüngliche Nachricht-----
Von: Maruan Sahyoun [mailto:[email protected]] 
Gesendet: Freitag, 17. Mai 2013 12:58
An: [email protected]
Betreff: Re: String replace failed

That's not easy :-)

You wrote " . parser returned a unreadable string . " which is the string you 
are getting?

BR
Maruan


Am 17.05.2013 um 12:37 schrieb [email protected]:

> My target is to replace ##VERSION## with "Release 9.8.3.4 (12th April 2013)"
> It's on Page 3.
> 
> -----Ursprüngliche Nachricht-----
> Von: Maruan Sahyoun [mailto:[email protected]] 
> Gesendet: Freitag, 17. Mai 2013 12:33
> An: [email protected]
> Betreff: Re: String replace failed
> 
> fine, I can extract the text. Could you describe what you are doing? E.g. 
> which text would you like to replace? Do you have a sample code snippet to 
> verify? Do you receive an error?
> 
> BR
> Maruan Sahyoun
> 
> Am 17.05.2013 um 12:28 schrieb [email protected]:
> 
>> OK.... here it is
>> https://docs.google.com/file/d/0B9_jmweC39sxbmp2OXMtaXFTVG8/edit?usp=sharing
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: Maruan Sahyoun [mailto:[email protected]] 
>> Gesendet: Freitag, 17. Mai 2013 12:20
>> An: [email protected]
>> Betreff: Re: String replace failed
>> 
>> Hi Markus,
>> 
>> No - the mailing list doesn't allow them. Could you upload the file 
>> somewhere so we can download it?
>> 
>> BR
>> Maruan Sahyoun
>> 
>> Am 17.05.2013 um 12:09 schrieb <[email protected]>:
>> 
>>> Sorry, maybe our Mail-Gateway removes attachments
>>> 
>>> -----Ursprüngliche Nachricht-----
>>> Von: Maruan Sahyoun [mailto:[email protected]] 
>>> Gesendet: Freitag, 17. Mai 2013 11:59
>>> An: [email protected]
>>> Betreff: Re: String replace failed
>>> 
>>> Hi Markus,
>>> 
>>> could you be a little more specific? Maybe with a sample PDF and some code? 
>>> Replacing a string in a pdf can be much more complex than the ReplaceString 
>>> example suggests. 
>>> 
>>> BR
>>> Maruan Sahyoun
>>> 
>>> Am 17.05.2013 um 11:41 schrieb <[email protected]>:
>>> 
>>>> Hi,
>>>> 
>>>> I tried to use the String replace example, but the parser returned a 
>>>> unreadable string.
>>>> I use the java code like in the example.
>>>> 
>>>> Best regards
>>>> 
>>>> Markus
>>> 
>> 
> 

Reply via email to