Documentation
¶
Overview ¶
Package object is the PDF object syntax (ISO 32000-2 §7.3): the values a PDF file is made of, read from and written to their textual form.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSyntax = fmt.Errorf("pdf syntax error: %w", altshiftErrors.ErrParseError)
ErrSyntax is text that is not PDF object syntax; it is a parse error, so an endpoint answers it as bad input.
Functions ¶
Types ¶
type Dictionary ¶
func (Dictionary) Clone ¶
func (d Dictionary) Clone() Dictionary
Clone copies the dictionary itself, not the values in it; the copy of a nil dictionary is an empty one, ready to be written to.
func (Dictionary) Integer ¶
func (d Dictionary) Integer(key Name) (Integer, bool)
Integer returns the entry as an integer, if it is one.
type Indirect ¶
Indirect is a numbered object as it stands in a file between "obj" and "endobj".
func ParseIndirect ¶
func ParseIndirect(data []byte, offset int, resolveLength LengthResolver) (*Indirect, error)
ParseIndirect reads "N G obj ... endobj" at offset, its stream data included.
type LengthResolver ¶
LengthResolver turns a stream's /Length, which may be a reference, into a number of bytes.
type Object ¶
type Object any
Object is one of nil (null), Boolean, Integer, Real, Name, *String, Array, Dictionary, *Reference or *Stream.
type Stream ¶
type Stream struct {
Dictionary Dictionary
Data []byte
}
Stream is a dictionary and its data as stored, still encoded by whatever filters the dictionary names.