Skip to main content
A newer version of this page is available. .

PdfViewer.SaveDocument(String) Method

Saves the current PDF to the specified file path.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v18.2.dll

Declaration

public bool SaveDocument(
    string path
)

Parameters

Name Type Description
path String

A System.String value, specifying the document location.

Returns

Type Description
Boolean

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

Remarks

When calling this method, canceling the operation will restore the previously saved document file.

If the PdfViewer.DetachStreamAfterLoadComplete property is set to false (default mode) the PDF Viewer locks a file to which a document is saved until the document is opened in the PDF Viewer. If you want the PDF Viewer does not lock the file, set the PdfViewer.DetachStreamAfterLoadComplete property to true.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveDocument(String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also