Safe Haskell | None |
---|---|
Language | Haskell98 |
Basic implementation of pdf monad
- type Pdf m = PdfE (Pdf' m)
- data Pdf' m a
- runPdf :: MonadIO m => RIS -> [StreamFilter] -> Pdf m a -> m (Either PdfError a)
- runPdfWithHandle :: MonadIO m => Handle -> [StreamFilter] -> Pdf m a -> m (Either PdfError a)
- document :: MonadIO m => Pdf m Document
- flushObjectCache :: Monad m => Pdf m ()
- withoutObjectCache :: Monad m => Pdf m () -> Pdf m ()
- knownFilters :: [StreamFilter]
- isEncrypted :: MonadIO m => Pdf m Bool
- setUserPassword :: MonadIO m => ByteString -> Pdf m Bool
- defaultUserPassword :: ByteString
- decrypt :: MonadIO m => Ref -> Object a -> Pdf m (Object a)
- class Monad m => MonadIO m where
Documentation
Basic implementation of pdf monad
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
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 Bool Source
Whether the PDF document it encrypted
setUserPassword :: MonadIO m => ByteString -> Pdf m Bool Source
Set the password to be user for decryption
Returns False when the password is wrong
defaultUserPassword :: ByteString Source
The default user password
decrypt :: MonadIO m => Ref -> Object a -> Pdf m (Object a) Source
Decrypt PDF object using user password is set