Back to Devexpress

PdfDocumentProcessor.SaveDocument(Stream, PdfSaveOptions, Boolean) Method

officefileapi-devexpress-dot-pdf-dot-pdfdocumentprocessor-dot-savedocument-x28-system-dot-io-dot-stream-devexpress-dot-pdf-dot-pdfsaveoptions-system-dot-boolean-x29.md

latest2.6 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public void SaveDocument(
    Stream stream,
    PdfSaveOptions options,
    bool detachStream
)
vb
Public Sub SaveDocument(
    stream As Stream,
    options As PdfSaveOptions,
    detachStream As Boolean
)

Parameters

NameTypeDescription
streamStream

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

When you dispose of an output stream that has not been detached, an attempt to apply further changes to a document may cause errors. Pass true as the detachStream method parameter to safely close the stream when a document is saved.

Using the same stream for loading and saving a document may cause unpredictable results if the detachStream parameter is set to false.

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