Click or drag to resize

PDFDocSaveAsync Method

Saves all changes incrementally to the document and writes them to the original source. Incremental saving is very fast, as it only appends data to the end of the file (and so is independent of the file size) This is suitable for quick save operations that you don't want to interrupt the user of the app.

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public IAsyncAction SaveAsync()

Return Value

Type: IAsyncAction
An object that is used to manage the asynchronous operation.
Remarks

Saving will lock the document for the duration of the save.

This save method performs incremental saving only with all the default options.

This save method will succeed depending on how the PDFDoc instance was created. In general case, if the backing store where the PDFDoc was created from allows for write permissions to be set arbitrarily, then this method can successfully complete the save operation. Otherwise, the save operation may throw an exception.

If the original pdf has a corrupt xref table (see HasRepairedXref or http://www.pdftron.com/kb_corrupt_xref), then this save can not be used.

The following describes which PDFDoc constructor this SaveAsync method will work:

ConstructorSaveAsync(SDF::SDFDocSaveoptions) behaviour.
PDFDoc(const Platform::Array<uint8>^)Does not work.
PDFDoc(Windows::Storage::Streams::IBuffer^)Does not work.
PDFDoc(Windows::Storage::Streams::IInputStream^)Does not work.
PDFDoc(Windows::Storage::Streams::IRandomAccessStream^)Works if opened with ReadWrite FileAccessMode.
PDFDoc(Windows::Storage::IStorageFile^)Works.
PDFDoc(Platform::String^)Works, but behaviour depends whether filepath points within app storage or not.
PDFDoc(SDF::SDFDoc^)Does not work.

See Also