Skip to content

Clone Objects #1194

@pubpub-zz

Description

@pubpub-zz

Explanation

I've noted some (many?) issues dealing that PyPDF2 is missing capability to clone objects (and all items below)
for example this would allow to insert the same page multiple time but modifying it

Code Example

the proposed interface would be (for all type of objects)
object.clone(pdf_dest,force_duplicate=False) -> duplicated_object
pdf_dest would be a PdfWriter or PdfMerger
by default already duplicated indirect object will be kept unique but setting force_duplicate to true will force duplication

Any Feedbacks?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions