Skip to content

Replacing text with redaction and insert_textbox and fixing reading order #3422

Answered by JorjMcKie
bkonic asked this question in Q&A
Discussion options

You must be logged in to vote

This is a typical Discussions post.

To your question:

There is no way to do it otherwise. Any other solution would require to recreate the PDF. PDF is not Word.
Other elements (text, images, graphics) on the page stay where they are and cannot be changed.
What is more, the emptied space of removed text cannot be resized in any way. New text must fit exactly - and quite some effort is needed to fit replacement text exactly - in terms of font selection, font size, color and insertion point.
Even if all that is done perfectly, the new text is physically appended to the page's appearance source code (no "new layer") and will therefore be read at last - if using plain / naive text extraction.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bkonic
Comment options

@JorjMcKie
Comment options

@bkonic
Comment options

@JorjMcKie
Comment options

Answer selected by bkonic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3421 on April 29, 2024 08:57.