A collection of tools for processing PDF files in Haskell
Haskell
184
262 commits
updated Aug 1, 2026
A collection of tools for processing PDF files
(Also see examples and viewer directories)
Inspect high level structure:
import Control.Monad
import Pdf.Document
main =
withPdfFile "input.pdf" $ \pdf -> do
encrypted <- isEncrypted pdf
when encrypted $ do
ok <- setUserPassword pdf defaultUserPassword
unless ok $
fail "need password"
doc <- document pdf
catalog <- documentCatalog doc
rootNode <- catalogPageNode catalog
count <- pageNodeNKids rootNode
print count
-- the first page of the document
page <- pageNodePageByNum rootNode 0
-- extract text
txt <- pageExtractText page
print txt
...
Haskell
99.9%
A collection of tools for processing PDF files in Haskell
Haskell
184
262 commits
updated Aug 1, 2026
A collection of tools for processing PDF files
(Also see examples and viewer directories)
Inspect high level structure:
import Control.Monad
import Pdf.Document
main =
withPdfFile "input.pdf" $ \pdf -> do
encrypted <- isEncrypted pdf
when encrypted $ do
ok <- setUserPassword pdf defaultUserPassword
unless ok $
fail "need password"
doc <- document pdf
catalog <- documentCatalog doc
rootNode <- catalogPageNode catalog
count <- pageNodeNKids rootNode
print count
-- the first page of the document
page <- pageNodePageByNum rootNode 0
-- extract text
txt <- pageExtractText page
print txt
...
Haskell
99.9%