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

Safe HaskellNone
LanguageHaskell98

Pdf.Toolbox.Core.Object.Types

Description

Module contains definitions of pdf objects

See PDF1.7:7.3

Synopsis

Documentation

data Object a #

Any pdf object

It is parameterized by Stream content

Instances

Eq a => Eq (Object a) # 

Methods

(==) :: Object a -> Object a -> Bool #

(/=) :: Object a -> Object a -> Bool #

Show a => Show (Object a) # 

Methods

showsPrec :: Int -> Object a -> ShowS #

show :: Object a -> String #

showList :: [Object a] -> ShowS #

data Number #

Integer or real

Constructors

NumInt Int 
NumReal Double 

Instances

Eq Number # 

Methods

(==) :: Number -> Number -> Bool #

(/=) :: Number -> Number -> Bool #

Show Number # 
FromObject Number # 

Methods

fromObject :: (Show a, Monad m) => Object a -> PdfE m Number #

newtype Boolean #

"true" or "false"

Constructors

Boolean Bool 

Instances

newtype Name #

Names usually are used as keys in dictionaries

They starts with '/', but we strip it out, see parseName

Constructors

Name ByteString 

Instances

Eq Name # 

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Ord Name # 

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Show Name # 

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

IsString Name # 

Methods

fromString :: String -> Name #

Monoid Name # 

Methods

mempty :: Name #

mappend :: Name -> Name -> Name #

mconcat :: [Name] -> Name #

FromObject Name # 

Methods

fromObject :: (Show a, Monad m) => Object a -> PdfE m Name #

newtype Dict #

Set of key/value pairs

Constructors

Dict [(Name, Object ())] 

Instances

Eq Dict # 

Methods

(==) :: Dict -> Dict -> Bool #

(/=) :: Dict -> Dict -> Bool #

Show Dict # 

Methods

showsPrec :: Int -> Dict -> ShowS #

show :: Dict -> String #

showList :: [Dict] -> ShowS #

FromObject Dict # 

Methods

fromObject :: (Show a, Monad m) => Object a -> PdfE m Dict #

newtype Array #

An array

Constructors

Array [Object ()] 

Instances

Eq Array # 

Methods

(==) :: Array -> Array -> Bool #

(/=) :: Array -> Array -> Bool #

Show Array # 

Methods

showsPrec :: Int -> Array -> ShowS #

show :: Array -> String #

showList :: [Array] -> ShowS #

FromObject Array # 

Methods

fromObject :: (Show a, Monad m) => Object a -> PdfE m Array #

newtype Str #

Sequence of zero or more bytes

Represents both the literal and hexadecimal strings

Constructors

Str ByteString 

Instances

Eq Str # 

Methods

(==) :: Str -> Str -> Bool #

(/=) :: Str -> Str -> Bool #

Show Str # 

Methods

showsPrec :: Int -> Str -> ShowS #

show :: Str -> String #

showList :: [Str] -> ShowS #

IsString Str # 

Methods

fromString :: String -> Str #

FromObject Str # 

Methods

fromObject :: (Show a, Monad m) => Object a -> PdfE m Str #

data Stream a #

Contains stream dictionary and a payload

The payload could be offset within pdf file, actual content, content stream or nothing

Constructors

Stream Dict a 

Instances

Eq a => Eq (Stream a) # 

Methods

(==) :: Stream a -> Stream a -> Bool #

(/=) :: Stream a -> Stream a -> Bool #

Show a => Show (Stream a) # 

Methods

showsPrec :: Int -> Stream a -> ShowS #

show :: Stream a -> String #

showList :: [Stream a] -> ShowS #

data Ref #

Object reference, contains object index and generation

Constructors

Ref Int Int 

Instances

Eq Ref # 

Methods

(==) :: Ref -> Ref -> Bool #

(/=) :: Ref -> Ref -> Bool #

Ord Ref # 

Methods

compare :: Ref -> Ref -> Ordering #

(<) :: Ref -> Ref -> Bool #

(<=) :: Ref -> Ref -> Bool #

(>) :: Ref -> Ref -> Bool #

(>=) :: Ref -> Ref -> Bool #

max :: Ref -> Ref -> Ref #

min :: Ref -> Ref -> Ref #

Show Ref # 

Methods

showsPrec :: Int -> Ref -> ShowS #

show :: Ref -> String #

showList :: [Ref] -> ShowS #

FromObject Ref # 

Methods

fromObject :: (Show a, Monad m) => Object a -> PdfE m Ref #