Skip to main content

PdfViewerExtensions.SaveDocument(IPdfViewer, String, PdfSaveOptions) Method

Saves the document to the specified file path with encryption settings and document signature. This is an extension method.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v24.1.dll

NuGet Package: DevExpress.Document.Processor


public static bool SaveDocument(
    this IPdfViewer viewer,
    string path,
    PdfSaveOptions options


Name Type Description
viewer IPdfViewer

A PdfViewer or PdfViewerControl object that implements the IPdfViewer interface.

path String

A System.String, specifying the path to the directory to which the PDF document should be saved.

options PdfSaveOptions

A PdfSaveOptions that contains the encryption and sign settings of a PDF document that should be saved.


Type Description

true, if the document is saved successfully; false, if the document saving operation is cancelled by the user.


See the Document Protection and Signing Document topics to learn more.


The PDF Viewer locks a file while a document is saved (the PdfViewer.DetachStreamAfterLoadComplete or PdfViewerControl.DetachStreamOnLoadComplete property is set to false by default). To unlock the file, set the PdfViewer.DetachStreamAfterLoadComplete (PdfViewerControl.DetachStreamOnLoadComplete) property to true.

See Also