pub fn remove_object(&mut self, object_id: &ObjectId) -> Result<()> {
        for (_, page_id) in self.get_pages() {
            let page = self.get_object_mut(page_id)?.as_dict_mut()?;
            let annots = page.get_mut(b"Annots")?.as_array_mut()?;

            annots.retain(|object| {
                if let Ok(id) = object.as_reference() {
                    return id != *object_id;
                }

                true
            });
        }

        Ok(())
    }
/// Remove PDF object from document's object list.
Remove PDF object from document's object list.
Remove PDF object from document ' s object list .
pub fn remove_object(&mut self, object_id: &ObjectId) -> Result<()> {
        for (_, page_id) in self.get_pages() {
            let page = self.get_object_mut(page_id)?.as_dict_mut()?;
            let annots = page.get_mut(b"Annots")?.as_array_mut()?;
            annots.retain(|object| {
                if let Ok(id) = object.as_reference() {
                    return id != *object_id;
                }
                true
            });
        }
        Ok(())
    }
pub fn remove_object ( & mut self , object_id : & ObjectId ) -> Result < ( ) > { for ( _ , page_id ) in self . get_pages ( ) { let page = self . get_object_mut ( page_id ) ? . as_dict_mut ( ) ? ; let annots = page . get_mut ( b" " ) ? . as_array_mut ( ) ? ; annots . retain ( | object | { if let Ok ( id ) = object . as_reference ( ) { return id != * object_id ; } true } ) ; } Ok ( ( ) ) }
Remove PDF object from document's object list.
Remove PDF object from document ' s object list .
&mut self
object_id
&ObjectId
&mut self
object_id
&ObjectId