You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by David Lee <pe...@gmail.com> on 2015/05/11 19:43:45 UTC

About String Replacement

Hi,

I am very eager to implement the following code, but Tj or TJ returning
nothing, so the rest of the code is not working. I am using it with a very
simple pdf (attached).

https://svn.apache.org/repos/asf/pdfbox/tags/1.5.0/pdfbox/src/main/java/org/apache/pdfbox/examples/pdmodel/ReplaceString.java

I will be glad to know what's wrong.

Thanks.

Sam

Re: About String Replacement

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 11.05.2015 um 19:43 schrieb David Lee:
> Hi,
>
> I am very eager to implement the following code, but Tj or TJ 
> returning nothing, so the rest of the code is not working. I am using 
> it with a very simple pdf (attached).
>
> https://svn.apache.org/repos/asf/pdfbox/tags/1.5.0/pdfbox/src/main/java/org/apache/pdfbox/examples/pdmodel/ReplaceString.java
>
> I will be glad to know what's wrong.
>

I don't understand you: you mention you want to implement something that 
is already implemented, obviously since 1.5.0 at least (we're at version 
1.8.9 now).
What exactly is happening? "Tj or TJ returning nothing" doesn't make 
sense, these are PDF operators, they don't return anything.

Maybe you meant that you wanted to run that sample...

The good news is that because your post landed in moderation, the 
moderators (one of which is me) have a copy of the PDF (it isn't in the 
mailing list). The arguments of TJ are not human readable, because a 
font subset is used, i.e. this isn't pure ascii, only codes 1-21 are used.

So how can we help?

Tilman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: About String Replacement

Posted by John Hewson <jo...@jahewson.com>.
What version of PDFbox are you using? We removed that functionality in 2.0 because it was fundamentally broken. The code you link to is still available in PDFBox 1.8.x, but it doesn’t work properly - if you’re lucky it will work on simple PDF files.

— John

> On 11 May 2015, at 10:43, David Lee <pe...@gmail.com> wrote:
> 
> Hi,
> 
> I am very eager to implement the following code, but Tj or TJ returning nothing, so the rest of the code is not working. I am using it with a very simple pdf (attached).
> 
> https://svn.apache.org/repos/asf/pdfbox/tags/1.5.0/pdfbox/src/main/java/org/apache/pdfbox/examples/pdmodel/ReplaceString.java <https://svn.apache.org/repos/asf/pdfbox/tags/1.5.0/pdfbox/src/main/java/org/apache/pdfbox/examples/pdmodel/ReplaceString.java>
> 
> I will be glad to know what's wrong.
> 
> Thanks.
> 
> Sam
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org