Click or drag to resize

PDFDocSaveAsync Method (IStorageFile, SDFDocSaveOptions)

Saves all changes to the document and writes them to an IRandomAccessStream instance without using the saved document as the new source. Note, this will assume that randomAccessStream is pointing to a different location that the PDFDoc currently is. If this is not the case, the behavior is undefined and may corrupt the underlying document.
Saves all changes to the document and writes them to file specified by the IStorageFile instance.

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

Parameters

storageFile
Type: IStorageFile
The IStorageFile instance where to save the document to.
flags
Type: pdftron.SDFSDFDocSaveOptions
Options for saving the document.Options for saving the document.

Return Value

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

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.

Remarks

It is important to keep in mind that the same IStorageFile instance as the source PDF document should not be passed to this function. Doing so will cause undefined behaviour. If you wish to save to the same IStorageFile instance, please use the SaveAsync function that only takes the Saveoptions as parameter.

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