Optionalposition: { x: number; y: number }Optionaloptions: IExportFileModelOptionsOptionalrect: [number, number, number, number]Optionalzoom: numberOptionalpageBox: DrawPageBox"Save": write the document back to the source it was opened from. Resolves true once
it is saved, false when there is no such source or the target declined/failed —
a user cancel of the target's own dialog is a false too, reported as nothing.
Optionaloptions: IExportFileModelOptions"Save as": write the document to target and adopt it as the document's source, so
the next saveDocument goes there. Without a target it falls back to the
document's own source when that one can take a "Save as", then to the first writable
one; with nothing to write to it resolves false and reports the failure.
Optionaloptions: IExportFileModelOptionsOptionaltarget: ISaveAsTargetThe source this document can be saved back to — the provider plus the item "Save"
would overwrite there — or null when it has none (a new document, or a source that
is gone or read-only). Decides between "Save" and "Save as".
Optionalparams: anySets the margins for the document.
Optionalvalidate: { fileType: boolean; maxSize?: number; security: boolean }Optionalpartial: booleanOptionalviewMode: stringOptionalpoint: { x: number; y: number }
Export the document as a plain download — never a save. The file leaves through
onExportFile/ the browser, and the document keeps its path, its source and its undo history: a download changes nothing about the open document.Pass
commitChanges: truefor user-triggered exports only — it commits the in-progress edit/selection before exporting. Programmatic exports (external autosave) must omit it so the user is never kicked out of an active edit.