1PDF::Builder::Basic::PDUFs:e:rObCjoinntdr(i3b)uted PerlPDDoFc:u:mBeunitladteiro:n:Basic::PDF::Objind(3)
2
3
4
6 PDF::Builder::Basic::PDF::Objind - PDF indirect object reference. Also
7 acts as an abstract superclass for all elements in a PDF file.
8
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
36 PDF::Builder::Basic::PDF::Objind->new()
37 Creates a new indirect object
38
39 $UID = $r->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 '"PDF::Builder::Basic::PDF::File->release"' (so you don't have to call
47 it yourself).
48
49 Note: it is important that this method get called at some point prior
50 to the actual destruction of the object. Internally, PDF files have an
51 enormous amount of cross-references and this causes circular references
52 within our own internal data structures. Calling '"release()"' forces
53 these circular references to be cleaned up and the entire internal data
54 structure purged.
55
56 $value = $r->val()
57 Returns the value of this object or reads the object and then returns
58 its value.
59
60 Note that all direct subclasses *must* make their own versions of this
61 subroutine otherwise we could be in for a very deep loop!
62
63 $r->realise()
64 Makes sure that the object is fully read in, etc.
65
66 $v = $r->outobjdeep($fh, $pdf)
67 If you really want to output this object, then you need to read it
68 first. This also means that all direct subclasses must subclass this
69 method, or they will loop forever!
70
71 $r->outobj($fh, $pdf)
72 If this is a full object then outputs a reference to the object,
73 otherwise calls outobjdeep to output the contents of the object at this
74 point.
75
76 $s = $r->elements()
77 Abstract superclass function filler. Returns self here but should
78 return something more useful if an array.
79
80 The old name of this method, "elementsof", has been deprecated and will
81 be removed in the future.
82
83 $s = $r->empty()
84 Empties all content from this object to free up memory or to be read to
85 pass the object into the free list. Simplistically undefs all instance
86 variables other than object number and generation.
87
88 $o = $r->merge($objind)
89 This merges content information into an object reference placeholder.
90 This occurs when an object reference is read before the object
91 definition and the information in the read data needs to be merged into
92 the object placeholder.
93
94 $r->is_obj($pdf)
95 Returns whether this object is a full object with its own object number
96 or whether it is purely a sub-object. $pdf indicates which output file
97 we are concerned that the object is an object in.
98
99 $r->copy($pdf, $res)
100 Returns a new copy of this object. The object is assumed to be some
101 kind of associative array and the copy is a deep copy for elements
102 which are not PDF objects, according to $pdf, and shallow copy for
103 those that are. Notice that calling "copy" on an object forces at
104 least a one level copy even if it is a PDF object. The returned object
105 loses its PDF object status though.
106
107 If $res is defined then the copy goes into that object rather than
108 creating a new one. It is up to the caller to bless $res, etc. Notice
109 that elements from $self are not copied into $res if there is already
110 an entry for them existing in $res.
111
112
113
114perl v5.34.0 2021-07-22PDF::Builder::Basic::PDF::Objind(3)