1Text::PDF::Objind(3)  User Contributed Perl Documentation Text::PDF::Objind(3)
2
3
4

NAME

6       Text::PDF::Objind - PDF indirect object reference. Also acts as an
7       abstract superclass for all elements in a PDF file.
8

INSTANCE VARIABLES

10       Instance variables differ from content variables in that they all start
11       with a space.
12
13       parent
14           For an object which is a reference to an object in some source,
15           this holds the reference to the source object, so that should the
16           reference have to be de-referenced, then we know where to go and
17           get the info.
18
19       objnum (R)
20           The object number in the source (only for object references)
21
22       objgen (R)
23           The object generation in the source
24
25           There are other instance variables which are used by the parent for
26           file control.
27
28       isfree
29           This marks whether the object is in the free list and available for
30           re-use as another object elsewhere in the file.
31
32       nextfree
33           Holds a direct reference to the next free object in the free list.
34

METHODS

36   Text::PDF::Objind->new()
37       Creates a new indirect object
38
39   uid
40       Returns a Unique id for this object, creating one if it didn't have one
41       before
42
43   $r->release
44       Releases ALL of the memory used by this indirect object, and all of its
45       component/child objects.  This method is called automatically by
46       '"Text::PDF::File->release"' (so you don't have to call it yourself).
47
48       NOTE, that it is important that this method get called at some point
49       prior to the actual destruction of the object.  Internally, PDF files
50       have an enormous amount of cross-references and this causes circular
51       references within our own internal data structures.  Calling
52       '"release()"' forces these circular references to be cleaned up and the
53       entire internal data structure purged.
54
55       Developer note: As part of the brute-force cleanup done here, this
56       method will throw a warning message whenever unexpected key values are
57       found within the "Text::PDF::Objind" object.  This is done to help
58       ensure that unexpected and unfreed values are brought to your
59       attention, so you can bug us to keep the module updated properly;
60       otherwise the potential for memory leaks due to dangling circular
61       references will exist.
62
63   $r->val
64       Returns the val of this object or reads the object and then returns its
65       value.
66
67       Note that all direct subclasses *must* make their own versions of this
68       subroutine otherwise we could be in for a very deep loop!
69
70   $r->realise
71       Makes sure that the object is fully read in, etc.
72
73   $r->outobjdeep($fh, $pdf)
74       If you really want to output this object, then you must need to read it
75       first.  This also means that all direct subclasses must subclass this
76       method or loop forever!
77
78   $r->outobj($fh)
79       If this is a full object then outputs a reference to the object,
80       otherwise calls outobjdeep to output the contents of the object at this
81       point.
82
83   $r->elementsof
84       Abstract superclass function filler. Returns self here but should
85       return something more useful if an array.
86
87   $r->empty
88       Empties all content from this object to free up memory or to be read to
89       pass the object into the free list. Simplistically undefs all instance
90       variables other than object number and generation.
91
92   $r->merge($objind)
93       This merges content information into an object reference place-holder.
94       This occurs when an object reference is read before the object
95       definition and the information in the read data needs to be merged into
96       the object place-holder
97
98   $r->is_obj($pdf)
99       Returns whether this object is a full object with its own object number
100       or whether it is purely a sub-object. $pdf indicates which output file
101       we are concerned that the object is an object in.
102
103   $r->copy($inpdf, $res, $unique, $outpdf, %opts)
104       Returns a new copy of this object.
105
106       $inpdf gives the source pdf object for the object to be copied. $outpdf
107       gives the target pdf for the object to be copied into. $outpdf may be
108       undefined. $res may be defined in which case the object is copied into
109       that object. $unique controls recursion. if $unique is non zero then
110       new objects are always created and recursion always occurs. But each
111       time recursion occurs, $unique is incremented. Thus is $unique starts
112       with a negative value it is possible to stop the recursion at a certain
113       depth. Of course for a positive value of $unique, recursion always
114       occurs.
115
116       If $unique is 0 then recursion only occurs if $outpdf is not the same
117       as $inpdf. In this case, a cache is held in $outpdf to see whether a
118       previous copy of the same object has been made. If so, then that
119       previous copy is returned otherwise a new object is made and added to
120       the cache and recursed into.
121
122       Objects that are full objects with their own id numbers are
123       correspondingly full objects in the output pdf.
124
125
126
127perl v5.30.1                      2020-01-30              Text::PDF::Objind(3)
Impressum