Back to Devexpress

PdfDocumentProcessor.SaveDocument(String, Boolean) Method

officefileapi-devexpress-dot-pdf-dot-pdfdocumentprocessor-dot-savedocument-x28-system-dot-string-system-dot-boolean-x29.md

latest2.2 KB
Original Source

PdfDocumentProcessor.SaveDocument(String, Boolean) Method

SECURITY-RELATED CONSIDERATIONS

Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.

Saves the current PDF document to the specified file using the detach stream mode.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public void SaveDocument(
    string path,
    bool detachStream
)
vb
Public Sub SaveDocument(
    path As String,
    detachStream As Boolean
)

Parameters

NameTypeDescription
pathString

A String that is the file path to which a document is saved.

| | detachStream | Boolean |

true , the PDF Document API component unlocks a file while a document is saved; false , the PDF Document API component locks a file while a document is saved (default mode).

|

Remarks

The PDF Document API component locks a file while a document is saved (the detachStream is set to false by default). To unlock this file, call the overloaded SaveDocument method with the detachStream parameter enabled.

Important

The PdfDocumentProcessor removes existing signatures from a document when it is saved. However, if you use PdfDocumentProcessor to apply a signature, it is retained.

See Also

PdfDocumentProcessor Class

PdfDocumentProcessor Members

DevExpress.Pdf Namespace