You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2020/10/17 08:27:00 UTC

[jira] [Commented] (PDFBOX-4989) How to change and replace text in pdf

    [ https://issues.apache.org/jira/browse/PDFBOX-4989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17215815#comment-17215815 ] 

Tilman Hausherr commented on PDFBOX-4989:
-----------------------------------------

It's not the correct place:

[https://pdfbox.apache.org/support.html]

PDF just isn't made for editing. What you want to do is extremely difficult or impossible, see here:

[https://pdfbox.apache.org/2.0/migration.html#why-was-the-replacetext-example-removed%3F]

But the page you link to also links to that explanation. There is also an answer somewhere in stackoverflow but I can't find it. Try opening the PDF in PDFDebugger and then look at the font, see which glyphs exist and at the encoding.

> How to change and replace text in pdf
> -------------------------------------
>
>                 Key: PDFBOX-4989
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4989
>             Project: PDFBox
>          Issue Type: Wish
>         Environment: windows 10
>            Reporter: Jürgen Debus
>            Priority: Major
>
> Hi @all,
> First: I'm not sure if this is the right forum. 
> If not, can you please tell me where to ask the question.
>  
> We've used the text search and replace approach of Ulf Dittmer here:
> [https://www.ulfdittmer.com/view?PdfboxReplace]
>  This worked fine.
> But because of changes in the PDF generating we get a crypted text that we can't replace:
>  Example:
>  Old: (sont liés. En cas de questions, consultez impérativement votre conseiller fiscal.) Tj
> New: (6"<.%S\)J:+d";,MO/$:;L+,+%:"L.:/+"<.%S+;JJ+/"I;S<$J3) Tj
>  When using PDFTextStripper to read the text it is „translated" in the right way.
>  What can we do to „decrypt" the text and save a new one?
>  
>  Best regards,
>  Jürgen



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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