CPDFOptimizeFlag enum

A single optimization step that can be enabled while optimizing a document.

Each entry carries the bit used by the native optimizeFlags bit mask. A set of flags is sent to the native side as the combined mask produced by CPDFOptimizeFlagSet.toMask. The bits are identical on Android and iOS.

Inheritance
Available extensions

Values

removeUnusedObjects → const CPDFOptimizeFlag

Removes objects that nothing else references.

const CPDFOptimizeFlag(1 << 0)
removeEmptyObjects → const CPDFOptimizeFlag

Removes empty objects.

const CPDFOptimizeFlag(1 << 1)
removeSpecialAttributes → const CPDFOptimizeFlag

Removes special object attributes.

const CPDFOptimizeFlag(1 << 2)
removeEmbeddedFonts → const CPDFOptimizeFlag

Removes embedded fonts. Text may render with substituted fonts afterwards, so this is disabled by default.

const CPDFOptimizeFlag(1 << 3)

Removes links whose destination cannot be resolved.

const CPDFOptimizeFlag(1 << 4)
removeInvalidBookmarks → const CPDFOptimizeFlag

Removes bookmarks whose destination cannot be resolved.

const CPDFOptimizeFlag(1 << 5)
compressImages → const CPDFOptimizeFlag

Recompresses images using the color, grayscale and monochrome image options of CPDFOptimizeOptions.

const CPDFOptimizeFlag(1 << 6)
removeBookmarks → const CPDFOptimizeFlag

Removes every bookmark, valid ones included.

const CPDFOptimizeFlag(1 << 7)
removeAnnotations → const CPDFOptimizeFlag

Removes every annotation.

const CPDFOptimizeFlag(1 << 8)
removeForms → const CPDFOptimizeFlag

Removes every form.

const CPDFOptimizeFlag(1 << 9)
removeMultimedia → const CPDFOptimizeFlag

Removes every multimedia object.

const CPDFOptimizeFlag(1 << 10)
removeDocumentInfo → const CPDFOptimizeFlag

Removes the document information dictionary.

const CPDFOptimizeFlag(1 << 11)
removeMetadata → const CPDFOptimizeFlag

Removes the XMP metadata.

const CPDFOptimizeFlag(1 << 12)
removeObjectData → const CPDFOptimizeFlag

Removes object level data.

const CPDFOptimizeFlag(1 << 13)
removeFileAttachments → const CPDFOptimizeFlag

Removes embedded file attachments.

const CPDFOptimizeFlag(1 << 14)
removeExternalCrossRefs → const CPDFOptimizeFlag

Removes external cross references.

const CPDFOptimizeFlag(1 << 15)
removeOtherAppData → const CPDFOptimizeFlag

Removes data written by other applications.

const CPDFOptimizeFlag(1 << 16)
removeHiddenLayers → const CPDFOptimizeFlag

Removes hidden layers.

const CPDFOptimizeFlag(1 << 17)
mergeVisibleLayers → const CPDFOptimizeFlag

Merges the remaining visible layers into the page content.

const CPDFOptimizeFlag(1 << 18)
useFlateForUncompressedStreams → const CPDFOptimizeFlag

Applies Flate encoding to streams that are stored uncompressed.

const CPDFOptimizeFlag(1 << 19)
replaceLzwWithFlate → const CPDFOptimizeFlag

Re-encodes LZW compressed streams with Flate.

const CPDFOptimizeFlag(1 << 20)
removeUnusedNamedTargets → const CPDFOptimizeFlag

Removes named targets that nothing refers to.

const CPDFOptimizeFlag(1 << 21)
optimizePageContent → const CPDFOptimizeFlag

Rewrites page content streams in a more compact form.

const CPDFOptimizeFlag(1 << 22)
fastWebView → const CPDFOptimizeFlag

Linearizes the document for fast web view.

const CPDFOptimizeFlag(1 << 23)
removeFormSubmitImportResetActions → const CPDFOptimizeFlag

Removes form submit, import and reset actions.

const CPDFOptimizeFlag(1 << 24)
removeJavaScriptActions → const CPDFOptimizeFlag

Removes every JavaScript action.

const CPDFOptimizeFlag(1 << 25)
removePageThumbnails → const CPDFOptimizeFlag

Removes embedded page thumbnails.

const CPDFOptimizeFlag(1 << 26)
removeReplacedImagesAltText → const CPDFOptimizeFlag

Removes the alternate text of replaced images.

const CPDFOptimizeFlag(1 << 27)
removePageLabels → const CPDFOptimizeFlag

Removes page labels.

const CPDFOptimizeFlag(1 << 28)
removePrintSettings → const CPDFOptimizeFlag

Removes print settings.

const CPDFOptimizeFlag(1 << 29)
removeSearchIndex → const CPDFOptimizeFlag

Removes the embedded search index.

const CPDFOptimizeFlag(1 << 30)

Properties

bit → int
The bit this flag occupies in the native optimizeFlags mask.
final
hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromMask(int mask) → Set<CPDFOptimizeFlag>
Expands a native bit mask into the matching set of flags.

Constants

defaults → const Set<CPDFOptimizeFlag>
The default set used by CPDFOptimizeOptions.
values → const List<CPDFOptimizeFlag>
A constant List of the values in this enum, in order of their declaration.