pub fn apply_rewrite(
edit: &mut EditDoc<'_>,
page_ref: ObjRef,
page_dict: &Dict,
rewrite: &PageRewrite,
shared: &ShareCounts,
) -> BTreeMap<usize, usize>Expand description
Apply a page’s regenerated content to edit.
page_ref names the page dictionary; page_dict is its current contents;
shared names the object numbers more than one object points at.
Returns the map from each object’s old content-stream index to its new one, so the caller can renumber the page-object graph it still holds. An index missing from the map belongs to an element that was removed, and collapses to zero.