Skip to content

Encryption and Decryption of PDFs examples in documentation remove attachments, links, ... #2544

Answered by j-t-1
redfast00 asked this question in Q&A
Discussion options

You must be logged in to vote

Create a backup of the PDF, then switch these:

writer = PdfWriter()

for idx, page in enumerate(reader.pages):
    writer.add_page(page)

writer = PdfWriter(clone_from=reader)

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by stefan6419846
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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 #2543 on March 26, 2024 13:00.