pdf-toolbox-document-0.0.2.0: A collection of tools for processing PDF files.

Safe HaskellNone

Pdf.Toolbox.Document.Pdf

Description

Basic implementation of pdf monad

Synopsis

Documentation

type Pdf m = PdfE (Pdf' m)Source

Convenient type alias

data Pdf' m a Source

Basic implementation of pdf monad

Instances

MonadTrans Pdf' 
Monad m => Monad (Pdf' m) 
Functor m => Functor (Pdf' m) 
MonadIO m => MonadIO (Pdf' m) 
MonadIO m => MonadPdf (Pdf' m) 

runPdf :: MonadIO m => RIS -> [StreamFilter] -> Pdf m a -> m (Either PdfError a)Source

Execute PDF action with RIS

runPdfWithHandle :: MonadIO m => Handle -> [StreamFilter] -> Pdf m a -> m (Either PdfError a)Source

Execute PDF action with Handle

document :: MonadIO m => Pdf m DocumentSource

Get PDF document

flushObjectCache :: Monad m => Pdf m ()Source

Remove all objects from cache

withoutObjectCache :: Monad m => Pdf m () -> Pdf m ()Source

Perform action without adding objects to cache. Note: the existent cache is not flushed, and is used within the action

knownFilters :: [StreamFilter]

All stream filters implemented by the toolbox

Right now it contains only FlateDecode filter

isEncrypted :: MonadIO m => Pdf m BoolSource

Whether the PDF document it encrypted

setUserPassword :: MonadIO m => ByteString -> Pdf m BoolSource

Set the password to be user for decryption

Returns False when the password is wrong

defaultUserPassword :: ByteStringSource

The default user password

decrypt :: MonadIO m => Ref -> Object a -> Pdf m (Object a)Source

Decrypt PDF object using user password is set

class Monad m => MonadIO m where

Methods

liftIO :: IO a -> m a

Instances

MonadIO IO 
MonadIO (Generator r) 
MonadIO (Consumer c) 
MonadIO m => MonadIO (Pdf' m) 
MonadIO m => MonadIO (RandT g m) 
MonadIO m => MonadIO (EitherT e m) 
(Error e, MonadIO m) => MonadIO (ErrorT e m) 
MonadIO m => MonadIO (StateT s m)