PdfLoadedObjectMutator class
Makes writable an object that only exists in the bytes of the loaded document.
In a document opened from a file, the dictionary of an annotation, of the
/AcroForm or of the /Fields array normally is not a PdfObject: it
stays in the file and the PdfObjectStore hands it over only as a read
view. To change it in the incremental update, a new object with the same
number and the same generation has to be materialized, which then
overrides the original — that is what PdfSignatureFieldEditor already does
for the signature fields.
This class concentrates that step so that the annotation collection and the
form flattener do not repeat the rule, and it guarantees that an object is
materialized only once: the second change to the same annotation finds the
PdfObject already created and writes inside it, instead of writing the
same number twice into the output file.
It is a provisional stand-in for the PdfMutationContext planned for phase
F2 of the roadmap: there is no dirty set, no rollback and no signed-document
policy here.
Constructors
- PdfLoadedObjectMutator(PdfObjectStore store)
-
Creates the materializer over
store. - PdfLoadedObjectMutator.forDocument(PdfDocument document)
-
Creates the materializer with the store bound to the parser of
document.factory
Properties
- document → PdfDocument
-
The edited document.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store → PdfObjectStore
-
The object resolution used to read the original value.
final
Methods
-
arrayFor(
PdfIndirect reference) → PdfArray< PdfDataType> ? -
The array of
reference, ready to take changes. -
dictFor(
PdfIndirect reference) → PdfDict< PdfDataType> ? -
The dictionary of
reference, ready to take changes. -
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