pdf.duplicate_page
result = pdf.duplicate_page(src, page)
Input: src, page · Output: result
What it is
Inserts a copy of page immediately after it. The copy is a new page object -- rotating or cropping one afterward does not touch the other -- but shares its /Contents//Resources with the original (legal in PDF, and far cheaper than duplicating a stream's bytes).
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = pdf.duplicate_page(src, page) | src —not documented yetpage —Inserts a copy of page immediately after it. | result Vec | Returns a Vec of bytes, the new PDF. |
Examples
No documentation example calls this form yet. The File I/O chapter is where one belongs.