Safe Haskell | None |
---|
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 ()
- getRIS :: Monad m => Pdf m RIS
- knownFilters :: [StreamFilter]
- isEncrypted :: MonadIO m => Pdf m Bool
- setUserPassword :: MonadIO m => ByteString -> Pdf m ()
- defaultUserPassord :: ByteString
- decrypt :: MonadIO m => Ref -> Object a -> Pdf m (Object a)
- getDecryptor :: Monad m => Pdf m (Maybe Decryptor)
- 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
getRIS :: Monad m => Pdf m RISSource
Access to the underlying random access input stream. Can be used when you need to switch from high level to low level of details
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 ()Source
Set the password to be user for decryption
defaultUserPassord :: ByteStringSource
The default user password
decrypt :: MonadIO m => Ref -> Object a -> Pdf m (Object a)Source
Decrypt PDF object using user password is set