PdfDocumentProcessor.SaveDocument(Stream, PdfSaveOptions, Boolean) Method
Saves the current PDF document to the specified stream with encryption settings and document signature using detach stream mode.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Docs.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
stream | Stream | A Stream object that is the stream to which the PDF document is saved. |
options | PdfSaveOptions | A PdfSaveOptions object that contains the encryption settings and document signature that should be saved. |
detachStream | Boolean | true, the PDF Document API component completes all operations after saving a document; false, the stream should not be closed or modified while a PDF document is saved. |
Remarks
The SaveDocument method expects the input stream will not be closed or modified while a PDF document is saved (the detachStream parameter is set to false by default). Be aware that disposing of an output stream that has not been detached may cause errors on an attempt to apply further changes to a document. If you want to close the stream when a document is saved, call the overloaded SaveDocument method with the detachStream parameter enabled.
Important
Using the same stream for loading and saving a document may cause unpredictable results if the detachStream parameter is set to false.