Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Pdf.Document.Pdf
Synopsis
- data Pdf
- withPdfFile :: FilePath -> (Pdf -> IO a) -> IO a
- fromFile :: File -> IO Pdf
- fromHandle :: Handle -> IO Pdf
- fromBytes :: ByteString -> IO Pdf
- document :: Pdf -> IO Document
- lookupObject :: Pdf -> Ref -> IO Object
- streamContent :: Pdf -> Ref -> Stream -> IO (InputStream ByteString)
- rawStreamContent :: Pdf -> Ref -> Stream -> IO (InputStream ByteString)
- deref :: Pdf -> Object -> IO Object
- isEncrypted :: Pdf -> IO Bool
- setUserPassword :: Pdf -> ByteString -> IO Bool
- defaultUserPassword :: ByteString
- data EncryptedError = EncryptedError Text
- enableCache :: Pdf -> IO ()
- disableCache :: Pdf -> IO ()
Documentation
streamContent :: Pdf -> Ref -> Stream -> IO (InputStream ByteString) Source #
Get stream content, decoded and decrypted
Note: length of the content may differ from the raw one
rawStreamContent :: Pdf -> Ref -> Stream -> IO (InputStream ByteString) Source #
Get stream content without decoding it
setUserPassword :: Pdf -> ByteString -> IO Bool Source #
Set the password to be user for decryption
Returns False when the password is wrong
defaultUserPassword :: ByteString #
The default user password
data EncryptedError Source #
File is enctypted
Constructors
EncryptedError Text |
Instances
Exception EncryptedError Source # | |
Defined in Pdf.Document.Pdf Methods toException :: EncryptedError -> SomeException # | |
Show EncryptedError Source # | |
Defined in Pdf.Document.Pdf Methods showsPrec :: Int -> EncryptedError -> ShowS # show :: EncryptedError -> String # showList :: [EncryptedError] -> ShowS # |
enableCache :: Pdf -> IO () Source #
Cache object for future lookups
disableCache :: Pdf -> IO () Source #
Don't cache object for future lookups