How to remove hidden text in pdf file, which created with func show_pdf_page? #4454
Unanswered
Herrifly
asked this question in
Looking for help
Replies: 1 comment 2 replies
-
When you use for src_page in source:
left = src_page.rect
left.x1 = clip.x0
if not left.is_empty:
src_page.add_redact_annot(left)
right = src_page.rect
right.x0 = clip.x1
if not right.is_empty:
src_page.add_redact_annot(left)
top = src_page.rect
top.y1 = clip.y0
if not top.is_empty:
src_page.add_redact_annot(left)
btm = src_page.rect
btm.y0 = clip.y1
if not btm.is_empty:
src_page.add_redact_annot(left)
src_page.apply_redactions() # optionally select what to remove
tar_page.show_pdf_page(rect, src, src_page.number, clip=clip) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I am creating pdf files with important rectangles grouped, but the resulting pdf contains not only my notes, but also hidden text (of other parts of the target pdf) that I can copy and it prevents me from further processing, can I somehow leave only the visible text or create this pdf somehow Any other way? Thanks
Beta Was this translation helpful? Give feedback.
All reactions