graftPage

fun graftPage(source: PdfDocument, sourceIndex: Int): PdfReference

Deep-copy one page (and its full transitive object graph: resources, fonts, content streams, XObjects) from source into this editor under fresh object numbers, returning the new page reference. Inherited /MediaBox, /Resources, /Rotate are baked onto the copied page so it is self-contained, and /Parent is dropped (set later by applyPageOrder). Mirrors MuPDF's pdf_graft_page.