Class SaveOptions
Options applied when saving a PDF document via Save(Stream).
Inherited Members
Namespace: DRIT.Pdf.IO
Assembly: DRIT.Pdf.dll
Syntax
public sealed class SaveOptions
Properties
CompressContentStreams
Gets or sets whether unfiltered content streams are Flate-compressed when written. Defaults to false for compatibility with the historical uncompressed output.
Declaration
public bool CompressContentStreams { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Conformance
Conformance level to enforce when saving. When set to any value other than None, the library writes conformance metadata, an output intent, and validates font embedding before serializing.
Declaration
public ConformanceLevel Conformance { get; set; }
Property Value
| Type | Description |
|---|---|
| ConformanceLevel |
CrossReferenceType
Cross-reference format to use when writing (spec §7.5.4 / §7.5.8). Defaults to Table (classic xref).
Declaration
public PdfCrossReferenceType CrossReferenceType { get; set; }
Property Value
| Type | Description |
|---|---|
| PdfCrossReferenceType |
Encryption
Password-based encryption settings. null means the document is not encrypted.
Declaration
public PasswordEncryption? Encryption { get; set; }
Property Value
| Type | Description |
|---|---|
| PasswordEncryption |
Incremental
When true and the document was loaded from a stream, appends only
new and modified objects rather than rewriting the complete file.
Falls back to a full rewrite for documents created from scratch.
Declaration
public bool Incremental { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
UpdateDateInformation
When true, the serializer may overwrite date-related info entries
(for example /ModDate) with the current timestamp.
Set to false to preserve explicitly assigned date values.
Declaration
public bool UpdateDateInformation { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
UpdateProducerInformation
When true, the serializer may overwrite /Producer with the
library producer information when writing document info metadata.
Set to false to preserve an explicitly assigned producer value.
Declaration
public bool UpdateProducerInformation { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Version
The PDF version to write in the file header (spec §7.5.2). When null, defaults to PDF 1.7 (the DRIT.Pdf default).
Declaration
public PdfVersion? Version { get; set; }
Property Value
| Type | Description |
|---|---|
| PdfVersion? |
Methods
SetPasswordEncryption()
Creates a new PasswordEncryption instance, assigns it to Encryption, and returns it for further configuration.
Declaration
public PasswordEncryption SetPasswordEncryption()
Returns
| Type | Description |
|---|---|
| PasswordEncryption |