pub fn update_fields(docx: &[u8]) -> Result<Updated, FieldError>Expand description
Refresh PAGEREF, REF, NUMPAGES, SEQ and TOC cached results in
the body, headers, footers and notes.
Page numbers come from jubarte’s own layout; see the module-level comment for the cases where Word’s result and ours diverge.
§Errors
FieldError::Inspectwhen the package cannot be opened or read;FieldError::Layoutwhen the layout pass that backs page numbers fails (seejubarte_render::convert::ConvertError);FieldError::Packagewhen the rewritten package cannot be serialized back to bytes.