Click or drag to resize

PDFDocSaveAsync Method (SDFDocSaveOptions)

Saves all changes incrementally document and writes them to the original source. Note that this might be slow, unless you are using the e_incremental flag only. Preferably shouldn't be used while the user is viewing the document. Saving with the e_incremental flag only will only append data, making the save fast no matter the original file size.

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

Parameters

flags
Type: pdftron.SDFSDFDocSaveOptions
Options for saving the document.

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.

The save options can be combined using bitwise OR operations. Except the e_incremental option.

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 it can not be saved using the e_incremental flag.

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