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

Safe HaskellNone

Pdf.Toolbox.Core.IO

Description

Basic IO operations for PDF

Synopsis

Documentation

type IS = InputStream ByteStringSource

Sequential input stream

data RIS Source

Random access Input Stream

fromHandle :: Handle -> IO RISSource

Create RIS from Handle with default chunk size

fromHandle' :: Handle -> Int -> IO RISSource

Create RIS from Handle with the specified chunk size

class Monad m => MonadIO m where

Methods

liftIO :: IO a -> m a

Instances

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

liftIO :: MonadIO m => forall a. IO a -> m a

size :: MonadIO m => RIS -> PdfE m Int64Source

Total number of bytes in RIS

seek :: MonadIO m => RIS -> Int64 -> PdfE m ()Source

Change input position in RIS

tell :: MonadIO m => RIS -> PdfE m Int64Source

Current input position

parse :: MonadIO m => Parser r -> IS -> PdfE m rSource

Parse from IS

inputStream :: MonadIO m => RIS -> PdfE m ISSource

Convert random access stream to sequential

dropExactly :: MonadIO m => Int -> IS -> PdfE m ()Source

Same as readExactly, but ignores the result