.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PDF::API2::Basic::PDF::Objind 3pm" .TH PDF::API2::Basic::PDF::Objind 3pm "2023-09-29" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PDF::API2::Basic::PDF::Objind \- Low\-level PDF indirect object .SH "INSTANCE VARIABLES" .IX Header "INSTANCE VARIABLES" Instance variables differ from content variables in that they all start with a space. .IP "parent" 4 .IX Item "parent" For an object which is a reference to an object in some source, this holds the reference to the source object, so that should the reference have to be de-referenced, then we know where to go and get the info. .IP "objnum (R)" 4 .IX Item "objnum (R)" The object number in the source (only for object references) .IP "objgen (R)" 4 .IX Item "objgen (R)" The object generation in the source .Sp There are other instance variables which are used by the parent for file control. .IP "isfree" 4 .IX Item "isfree" This marks whether the object is in the free list and available for re-use as another object elsewhere in the file. .IP "nextfree" 4 .IX Item "nextfree" Holds a direct reference to the next free object in the free list. .SH "METHODS" .IX Header "METHODS" .SS "PDF::API2::Basic::PDF::Objind\->\fBnew()\fP" .IX Subsection "PDF::API2::Basic::PDF::Objind->new()" Creates a new indirect object .SS "uid" .IX Subsection "uid" Returns a Unique id for this object, creating one if it didn't have one before .ie n .SS "$r\->release" .el .SS "\f(CW$r\fP\->release" .IX Subsection "$r->release" Releases \s-1ALL\s0 of the memory used by this indirect object, and all of its component/child objects. This method is called automatically by \&'\f(CW\*(C`PDF::API2::Basic::PDF::File\->release\*(C'\fR' (so you don't have to call it yourself). .PP \&\fBNote:\fR it is important that this method get called at some point prior to the actual destruction of the object. Internally, \s-1PDF\s0 files have an enormous amount of cross-references and this causes circular references within our own internal data structures. Calling \&'\f(CW\*(C`release()\*(C'\fR' forces these circular references to be cleaned up and the entire internal data structure purged. .ie n .SS "$r\->val" .el .SS "\f(CW$r\fP\->val" .IX Subsection "$r->val" Returns the value of this object or reads the object and then returns its value. .PP Note that all direct subclasses *must* make their own versions of this subroutine otherwise we could be in for a very deep loop! .ie n .SS "$r\->realise" .el .SS "\f(CW$r\fP\->realise" .IX Subsection "$r->realise" Makes sure that the object is fully read in, etc. .ie n .SS "$r\->outobjdeep($fh, $pdf)" .el .SS "\f(CW$r\fP\->outobjdeep($fh, \f(CW$pdf\fP)" .IX Subsection "$r->outobjdeep($fh, $pdf)" If you really want to output this object, then you must need to read it first. This also means that all direct subclasses must subclass this method or loop forever! .ie n .SS "$r\->outobj($fh)" .el .SS "\f(CW$r\fP\->outobj($fh)" .IX Subsection "$r->outobj($fh)" If this is a full object then outputs a reference to the object, otherwise calls outobjdeep to output the contents of the object at this point. .ie n .SS "$r\->elements" .el .SS "\f(CW$r\fP\->elements" .IX Subsection "$r->elements" Abstract superclass function filler. Returns self here but should return something more useful if an array. .ie n .SS "$r\->empty" .el .SS "\f(CW$r\fP\->empty" .IX Subsection "$r->empty" Empties all content from this object to free up memory or to be read to pass the object into the free list. Simplistically undefs all instance variables other than object number and generation. .ie n .SS "$r\->merge($objind)" .el .SS "\f(CW$r\fP\->merge($objind)" .IX Subsection "$r->merge($objind)" This merges content information into an object reference place-holder. This occurs when an object reference is read before the object definition and the information in the read data needs to be merged into the object place-holder .ie n .SS "$r\->is_obj($pdf)" .el .SS "\f(CW$r\fP\->is_obj($pdf)" .IX Subsection "$r->is_obj($pdf)" Returns whether this object is a full object with its own object number or whether it is purely a sub-object. \f(CW$pdf\fR indicates which output file we are concerned that the object is an object in. .ie n .SS "$r\->copy($pdf, $res)" .el .SS "\f(CW$r\fP\->copy($pdf, \f(CW$res\fP)" .IX Subsection "$r->copy($pdf, $res)" Returns a new copy of this object. The object is assumed to be some kind of associative array and the copy is a deep copy for elements which are not \s-1PDF\s0 objects, according to \f(CW$pdf\fR, and shallow copy for those that are. Notice that calling \f(CW\*(C`copy\*(C'\fR on an object forces at least a one level copy even if it is a \s-1PDF\s0 object. The returned object loses its \s-1PDF\s0 object status though. .PP If \f(CW$res\fR is defined then the copy goes into that object rather than creating a new one. It is up to the caller to bless \f(CW$res\fR, etc. Notice that elements from \&\f(CW$self\fR are not copied into \f(CW$res\fR if there is already an entry for them existing in \f(CW$res\fR.