Documentation ¶
Overview ¶
Package numtree implements PDF number trees.
Number trees map integers to PDF objects. In PDF files these trees are used in two different contexts:
- The `PageLabels` entry in the document catalog is a number tree defining page labels for the pages in the document.
- The `ParentTree` entry in the structure tree root dictionary is a number tree used in finding the structure elements to which content items belong.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrKeyNotFound = errors.New("key not found")
)
Functions ¶
Types ¶
type SequentialWriter ¶
type SequentialWriter struct {
// contains filtered or unexported fields
}
func NewSequentialWriter ¶
func NewSequentialWriter(w pdf.Putter) *SequentialWriter
func (*SequentialWriter) Close ¶
func (sw *SequentialWriter) Close() error
func (*SequentialWriter) Reference ¶
func (sw *SequentialWriter) Reference() pdf.Reference
type Tree ¶
type Tree interface { // Get returns the value for a given key. If the key is not // found, Get returns ErrKeyNotFound. Get(key pdf.Integer) (pdf.Object, error) // First returns the smallest key in the tree. If the tree is // empty, First returns ErrKeyNotFound. First() (pdf.Integer, error) // Next returns the smallest key in the tree which is strictly larger // than the given key. If there is no such key, Next returns // ErrKeyNotFound. Next(after pdf.Integer) (pdf.Integer, error) // Prev returns the largest key in the tree which is smaller than or equal // to the given key. If there is no such key, Prev returns ErrKeyNotFound. Prev(before pdf.Integer) (pdf.Integer, error) }
Click to show internal directories.
Click to hide internal directories.