Qu

pdf.duplicate_page

Builtin index · File I/O

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.

CodeInputOutputDescription
result = pdf.duplicate_page(src, page)
src —not documented yet
page —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.