PDFDocSaveAsync Method (SDFDocSaveOptions) |
Namespace: pdftron.PDF
public IAsyncAction SaveAsync( SDFDocSaveOptions flags )
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:
Constructor | SaveAsync(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. |