pdf-toolbox-document-0.1.2: A collection of tools for processing PDF files.
Safe HaskellNone
LanguageHaskell2010

Pdf.Document.PageNode

Description

Page tree node

Synopsis

Documentation

data PageNode Source #

Page tree node, contains pages or other nodes

data PageTree Source #

Page tree

pageNodeNKids :: PageNode -> IO Int Source #

Total number of child leaf nodes, including deep children

pageNodeParent :: PageNode -> IO (Maybe PageNode) Source #

Parent page node

pageNodeKids :: PageNode -> IO [Ref] Source #

Referencies to all kids

loadPageNode :: Pdf -> Ref -> IO PageTree Source #

Load page tree node by reference

pageNodePageByNum :: PageNode -> Int -> IO Page Source #

Find page by it's number

Note: it is not efficient for PDF files with a lot of pages, because it performs traversal through the page tree each time. Use pageNodeNKids, pageNodeKids and loadPageNode for efficient traversal.