# SaveFlags Enum

> Enumeration SaveFlags.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/SaveFlags
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

**Namespace:** `Datalogics::PDFL`

## Values

- `Incremental = 0`: Incremental save only write objects that have changed after the end of the document rather than disturbing unchanged items. Use with Copy to create a new file which incorporates a copy of the input file before making changes. This flag can be useful when making changes to signed documents, as it preserves the validity of any existing signatures.
- `Full = 1`: Save the entire document.
- `Copy = 2`: Saves a copy of the document. Used with Incremental to create a new file from a binary copy of the input document.
- `Linearized = 4`: Save in a format that is suitable for remote (network) access, Linearized is sometimes referred to as Web Optimized because of its goal of minimizing the perception of poor performance due to the number of pages in a document. This inherently uses OptimizeFonts, for documents with a large number of fonts, font optimization can have poor performance, see SaveLinearizedNoOptimizeFonts as an alternative.
- `CollectGarbage = 32`: Collect Garbage by removing unreferenced objects. Only valid with Full.
- `KeepModDate = 128`: Do not update the Modification Date
- `CloseAfterSave = 16384`: Close document after save. Use this flag for saving to the stream only. Note that using this flag to save a document to any destination other than stream causes an exception.
- `XMPPacketReadOnlyNoPadding = 32768`: Save XMP data as read-only without padding
- `Uncompressed = 65536`: Do not use object stream compression. Only valid with Full.
- `Compressed = 131072`: Use object compression wherever possible. Only valid with Full.
- `CompressStructureOnly = 262144`: Use object compression only for Logical Structure items. Only valid with Full.
- `RemoveASCIIFilters = 524288`: Remove the ASCII85 filter from all streams where its in use. Only valid with Full.
- `AddFlate = 1048576`: Encode any uncompressed stream witht the Flate filter. Only valid with Full.
- `AddBrotli = 8192`: Encode any uncompressed stream with the Brotli filter. Only valid with Full. Ignored if AddFlate is also set, which takes precedence. Brotli is a PDF 2.0 extension (IETF RFC 7932) rather than part of ISO 32000-2:2020, so PDF readers that do not implement it cannot decode the affected streams.
- `ReplaceLZW = 2097152`: Replace any LZW encoded stream with Flate, or with Brotli when AddBrotli is also set. Only valid with Full.
- `OptimizeXObjects = 4194304`: Merge identical XObjects.
- `OptimizeContentStreams = 8388608`: Optimize Content Streams operators where possible.
- `OptimizeFonts = 16777216`: Merge Font Descriptors and encoding where possible. For documents with a large number of fonts, font optimization can have poor performance, this should only be set if necessary.
- `OptimizeMarkedJBIG2Dictionaries = 33554432`: Delete symbols specific to JBIG2 Dictionaries that couldn't be removed previously.
- `Ensure7bitASCII = 67108864`: Deprecated.
- `AutoSave = 134217728`: Deprecated.
- `DoNotCreateToUnicodeWidths = 512`: Don't create /ToUnicode and /Widths entries for Fonts to improve performance.
- `SaveOriginalMetadata = 1073741824`: Save original /Metadata stream of input as /Metadata stream of output document.
- `SaveLinearizedNoOptimizeFonts = 512`: Save the document as Linearized the same as Linearized but OptimizeFonts is disabled. For documents with a large number of fonts, font optimization can have poor performance and is often unnecessary.
