Text::PDF::Dict(3) User Contributed Perl Documentation Text::PDF::Dict(3)

# [NAME](#NAME)

Text::PDF::Dict - PDF Dictionaries and Streams. Inherits from PDF::Objind

# [INSTANCE VARIABLES](#INSTANCE_VARIABLES)

There are various special instance variables which are used to look after, particularly, streams. Each begins with a space:

[stream](#stream)

Holds the stream contents for output

[streamfile](#streamfile)

Holds the stream contents in an external file rather than in memory. This is not the same as a PDF file stream. The data is stored in its unfiltered form.

[streamloc](#streamloc)

If both ' stream' and ' streamfile' are empty, this indicates where in the source PDF the stream starts.

# [METHODS](#METHODS)

## [$d-&gt;outobjdeep($fh)](#$d)

Outputs the contents of the dictionary to a PDF file. This is a recursive call.

It also outputs a stream if the dictionary has a stream element. If this occurs then this method will calculate the length of the stream and insert it into the stream's dictionary.

## [$d-&gt;read\_stream($force\_memory)](#$d~2)

Reads in a stream from a PDF file. If the stream is greater than "PDF::Dict::mincache" (defaults to 32768) bytes to be stored, then the default action is to create a file for it somewhere and to use that file as a data cache. If $force\_memory is set, this caching will not occur and the data will all be stored in the $self-&gt;{' stream'} variable.

## [$d-&gt;val](#$d~3)

Returns the dictionary, which is itself.

## $d-&gt;copy($inpdf, $res, $unique, $outpdf, %opts)

Copies an object. See **Text::PDF::Objind::Copy()** for details

2026-10-03 perl v5.44.0

---

Document: Text::PDF::Dict(3pm) from perl-text-pdf 0.31-r0 (Chainguard OS)
