PdfSaveOptions Class
The options of PdfDocument.Save.
public sealed class PdfSaveOptionsRemarks
The output of a save depends only on the document and the options: the same document gives the same bytes.
Constructors
| Name | Description |
|---|---|
| PdfSaveOptions() |
PdfSaveOptions()
PdfSaveOptions.cspublic PdfSaveOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| CompressStreams | Gets a value indicating whether the streams without filter are compressed with FlateDecode. The default is true. |
| Default | Gets the default options. |
| Linearize | Gets a value indicating whether the file is linearized for fast web view (ISO 32000-2, Annex F): the objects of the first page come first, with hint tables that let a viewer show each page before the file is fully downloaded. The default is false. |
| UseObjectStreams | Gets a value indicating whether the objects that are not streams are written in object streams, with a cross-reference stream (PDF 1.5, ISO 32000-2, 7.5.7 and 7.5.8). The default is true. An incremental save keeps the kind of cross-reference of the original file: it writes the objects of the update in object streams when the file has cross-reference streams. |
| Version | Gets the version written in the header, or null (the default) for the version of the document, raised to what the options need. |
| XmpPadding | Gets the number of whitespace bytes the XMP packet the save writes for PdfDocument.PdfAConformance and PdfDocument.PdfUAConformance reserves before its end, so that an editor can update the packet in place. The default is 0. |
CompressStreams
PdfSaveOptions.csDefault
PdfSaveOptions.csLinearize
PdfSaveOptions.csGets a value indicating whether the file is linearized for fast web view (ISO 32000-2, Annex F): the objects of the first page come first, with hint tables that let a viewer show each page before the file is fully downloaded. The default is false.
public bool Linearize { get; init; }Property value
Remarks
A linearized file uses cross-reference tables and no object stream (PdfSaveOptions.UseObjectStreams is ignored), and is built in memory before it is written. The inheritable attributes of the page tree are written on the pages. It cannot be encrypted, and an incremental save cannot be linearized: an incremental update of a linearized file keeps the original file, which is then no longer linearized.
UseObjectStreams
PdfSaveOptions.csGets a value indicating whether the objects that are not streams are written in object streams, with a cross-reference stream (PDF 1.5, ISO 32000-2, 7.5.7 and 7.5.8). The default is true. An incremental save keeps the kind of cross-reference of the original file: it writes the objects of the update in object streams when the file has cross-reference streams.
public bool UseObjectStreams { get; init; }Property value
Version
PdfSaveOptions.csGets the version written in the header, or null (the default) for the version of the document, raised to what the options need.
public PdfVersion? Version { get; init; }Property value
XmpPadding
PdfSaveOptions.csGets the number of whitespace bytes the XMP packet the save writes for PdfDocument.PdfAConformance and PdfDocument.PdfUAConformance reserves before its end, so that an editor can update the packet in place. The default is 0.
public int XmpPadding { get; init; }