Click or drag to resize

PDFDocSaveAsync Method (IRandomAccessStream, SDFDocSaveOptions, String)

Saves all changes to the document and writes them to an IRandomAccessStream instance. Note, this save method will always create a copy of the document first, as it can no establish whether randomAccessStream is referring to the same location as the document, and so will make a copy for safety. If you know the location is different, then use SaveToNewLocationAsync.

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public IAsyncAction SaveAsync(
	IRandomAccessStream randomAccessStream,
	SDFDocSaveOptions flags,
	string filePath
)

Parameters

randomAccessStream
Type: IRandomAccessStream
The IRandomAccessStream instance where to save the document to.
flags
Type: pdftron.SDFSDFDocSaveOptions
Options for saving the document.
filePath
Type: SystemString
The file path of the document. This will only be used for the RecentlyUsedCache

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.

A full save with remove unused or linearization option may re-arrange object in the cross reference table. Therefore all pointers and references to document objects and resources should be re-acquired in order to continue document editing.

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.

See Also