Embodies one revision of a PDF file, either the initial version or an incremental update.
The purpose of a Revision object is to manage the objects and the trailer of one revision. These objects can either be added manually or loaded from a cross-reference section or stream. Since a PDF file can be incrementally updated, it can have multiple revisions.
If a revision doesn't have an associated cross-reference section, it wasn't created from a PDF file.
See: PDF1.7 s7.5.6, Revisions
The callable object responsible for loading objects.
The trailer dictionary
Public Class Methods
Creates a new Revision object.
An XRefSection object that contains information on how to load objects. If this option is specified, then a
loaderor a block also needs to be specified!
The loader object needs to respond to
calltaking a cross-reference entry and returning the loaded object. If no
xref_sectionis supplied, this value is not used.
If a block is given, it is used instead of the loader object.
Public Instance Methods
Adds the given object (needs to be a HexaPDF::Object) to this revision and returns it.
Deletes the object specified either by reference or by object number from this revision by marking it as free.
mark_as_free option is set to
object is really deleted.
Calls the given block once for every object of the revision.
Objects that are loadable via an associated cross-reference section but are currently not, are loaded automatically.
Returns the next free object number for adding an object to this revision.
Returns the object for the given reference or object number if such an
object is available in this revision, or
If the revision has an entry but one that is pointing to a free entry in the cross-reference section, an object representing PDF null is returned.