A newer version of this page is available. Switch to the current version.

PrintingSystemBase.SaveDocument(Stream, NativeFormatOptions) Method

Saves a document to a Stream object in a native XML format (PRNX) using the specified PRNX-specific options.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v18.2.Core.dll

Declaration

public void SaveDocument(
    Stream stream,
    NativeFormatOptions options
)
Public Sub SaveDocument(
    stream As Stream,
    options As NativeFormatOptions
)

Parameters

Name Type Description
stream Stream

A Stream object to which the created PRNX file should be sent.

options NativeFormatOptions

A NativeFormatOptions object which specifies the PRNX-specific options to be applied when a document is saved.

Remarks

Use the SaveDocument and PrintingSystemBase.LoadDocument methods to save a printing system's document (all its pages and bricks) to a PRNX file, and then load it into another printing system instance. This may be required, for example, when it's necessary to pass a generated report to another machine that doesn't have access to the same data as the machine that generated the report.

In addition, the printing system's PrintingSystemBase.ExportOptions provides the ExportOptions.NativeFormat property, which specifies how a document should be saved to a PRNX file. For example, set the NativeFormatOptions.Compressed property to true to reduce the size of the resulting PRNX file.

NOTE

Before saving a printing system's document, it must be created. For example, use the LinkBase.CreateDocument method for this.

See Also