PdfViewerExtensions.SaveDocument(IPdfViewer, Stream, PdfSaveOptions) Method
Saves the document to the specified stream with encryption settings and document signature. This is an extension method.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Docs.v24.2.dll
NuGet Package: DevExpress.Document.Processor
#Declaration
public static bool SaveDocument(
this IPdfViewer viewer,
Stream stream,
PdfSaveOptions options
)
#Parameters
Name | Type | Description |
---|---|---|
viewer | IPdf |
A Pdf |
stream | Stream | A System. |
options | Pdf |
A Pdf |
#Returns
Type | Description |
---|---|
Boolean | true, if the document is saved successfully; false, if the document saving operation is cancelled by the user. |
#Remarks
See the Document Protection and Signing Document topics to learn more.
The SaveDocument method expects the input stream will not be closed or modified while a PDF document is saved (the PdfViewer.DetachStreamAfterLoadComplete or PdfViewerControl.DetachStreamOnLoadComplete property 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, set the PdfViewer.DetachStreamAfterLoadComplete (PdfViewerControl.DetachStreamOnLoadComplete) property to true.