Skip to main content

delete_pages

Function delete_pages 

Source
pub fn delete_pages(
    dest: &mut EditDoc<'_>,
    range: &PageRange,
) -> Result<(), Error>
Expand description

Delete the pages range names, by the base document’s numbering.

Each page is unlinked from its parent’s /Kids and every /Count up the chain is decremented; the page object itself is left for the writer’s garbage collection. A duplicate index deletes once.

§Errors

Error::PageIndexOutOfRange when the range names a page the document does not have; the document is untouched on that.