It may seem unnecessary using an importer containing state for the task. However, by retaining some information about the already copied objects we can make sure that already imported objects don't get imported again.
Two types of indirect objects are never imported from one document to another: the catalog and page tree nodes. If the catalog was imported, the whole source document would be imported. And if one page tree node would imported, the whole page tree would be imported.
Public Class Methods
Importer object for copying objects from the
source to the
Initializes a new importer that can import objects from the
source document to the
Public Instance Methods
Imports the given
object from the source to the destination object and returns the imported object.
Note: Indirect objects are automatically added to the destination document but direct or simple objects are not.
An error is raised if the object doesn't belong to the