| Copyright | (c) 2006-2016 alpheccar.org |
|---|---|
| License | BSD-style |
| Maintainer | misc@NOSPAMalpheccar.org |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Graphics.PDF.Document
Description
Management of the PDF structure
Synopsis
- data PDFXForm
- addPage :: Maybe PDFRect -> PDF (PDFReference PDFPage)
- addPageWithTransition :: Maybe PDFRect -> Maybe PDFFloat -> Maybe PDFTransition -> PDF (PDFReference PDFPage)
- drawWithPage :: PDFReference PDFPage -> Draw a -> PDF a
- createPDFXForm :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Draw a -> PDF (PDFReference PDFXForm)
- createPDFXFormExtra :: Rectangle -> Draw a -> PDFDictionary -> PDF (PDFReference PDFXForm)
- data PDFTransition = PDFTransition !PDFFloat !PDFTransStyle
- data PDFTransStyle
- data PDFTransDirection
- data PDFTransDimension
- data PDFTransDirection2
- data PDFDocumentInfo = PDFDocumentInfo {}
- data PDFDocumentPageMode
- data PDFDocumentPageLayout
- data PDFViewerPreferences = PDFViewerPreferences {}
- standardDocInfo :: PDFDocumentInfo
- standardViewerPrefs :: PDFViewerPreferences
- data Draw a
- class PDFXObject a where
- drawXObject :: PDFReference a -> Draw ()
- class PDFGlobals m where
- bounds :: PDFXObject a => PDFReference a -> m (PDFFloat, PDFFloat)
- withNewContext :: Draw a -> Draw a
- emptyDrawing :: Draw ()
Document actions
Special document objects
Instances
| PDFXObject PDFXForm Source # | |
Defined in Graphics.PDF.Draw Methods drawXObject :: PDFReference PDFXForm -> Draw () Source # privateDrawXObject :: PDFReference PDFXForm -> Draw () | |
Page management
Arguments
| :: Maybe PDFRect | Page size or default document's one |
| -> PDF (PDFReference PDFPage) | Reference to the new page |
Add a new page to a PDF document
addPageWithTransition Source #
Arguments
| :: Maybe PDFRect | Page size or default document's one |
| -> Maybe PDFFloat | Optional duration |
| -> Maybe PDFTransition | Optional transition |
| -> PDF (PDFReference PDFPage) | Reference to the new page |
Arguments
| :: PDFReference PDFPage | Page |
| -> Draw a | Drawing commands |
| -> PDF a |
Draw on a given page
Arguments
| :: PDFFloat | Left |
| -> PDFFloat | Bottom |
| -> PDFFloat | Right |
| -> PDFFloat | Top |
| -> Draw a | Drawing commands |
| -> PDF (PDFReference PDFXForm) |
Create a PDF XObject
Arguments
| :: Rectangle | Bounding Box |
| -> Draw a | Drawing commands |
| -> PDFDictionary | |
| -> PDF (PDFReference PDFXForm) |
Create a PDF XObject
Page transitions
data PDFTransition Source #
A PDF Transition
Constructors
| PDFTransition !PDFFloat !PDFTransStyle |
Instances
| Eq PDFTransition Source # | |
Defined in Graphics.PDF.Draw Methods (==) :: PDFTransition -> PDFTransition -> Bool # (/=) :: PDFTransition -> PDFTransition -> Bool # | |
data PDFTransStyle Source #
Transition style
Constructors
| Split PDFTransDimension PDFTransDirection | |
| Blinds PDFTransDimension | |
| Box PDFTransDirection | |
| Wipe PDFTransDirection2 | |
| Dissolve | |
| Glitter PDFTransDirection2 |
Instances
| Show PDFTransStyle Source # | |
Defined in Graphics.PDF.Draw Methods showsPrec :: Int -> PDFTransStyle -> ShowS # show :: PDFTransStyle -> String # showList :: [PDFTransStyle] -> ShowS # | |
| Eq PDFTransStyle Source # | |
Defined in Graphics.PDF.Draw Methods (==) :: PDFTransStyle -> PDFTransStyle -> Bool # (/=) :: PDFTransStyle -> PDFTransStyle -> Bool # | |
data PDFTransDirection Source #
Direction of a transition
Instances
| Show PDFTransDirection Source # | |
Defined in Graphics.PDF.Draw Methods showsPrec :: Int -> PDFTransDirection -> ShowS # show :: PDFTransDirection -> String # showList :: [PDFTransDirection] -> ShowS # | |
| Eq PDFTransDirection Source # | |
Defined in Graphics.PDF.Draw Methods (==) :: PDFTransDirection -> PDFTransDirection -> Bool # (/=) :: PDFTransDirection -> PDFTransDirection -> Bool # | |
data PDFTransDimension Source #
Dimension of a transition
Constructors
| Horizontal | |
| Vertical |
Instances
| Show PDFTransDimension Source # | |
Defined in Graphics.PDF.Draw Methods showsPrec :: Int -> PDFTransDimension -> ShowS # show :: PDFTransDimension -> String # showList :: [PDFTransDimension] -> ShowS # | |
| Eq PDFTransDimension Source # | |
Defined in Graphics.PDF.Draw Methods (==) :: PDFTransDimension -> PDFTransDimension -> Bool # (/=) :: PDFTransDimension -> PDFTransDimension -> Bool # | |
data PDFTransDirection2 Source #
Direction of a transition
Constructors
| LeftToRight | |
| BottomToTop | Wipe only |
| RightToLeft | Wipe only |
| TopToBottom | |
| TopLeftToBottomRight | Glitter only |
Instances
| Eq PDFTransDirection2 Source # | |
Defined in Graphics.PDF.Draw Methods (==) :: PDFTransDirection2 -> PDFTransDirection2 -> Bool # (/=) :: PDFTransDirection2 -> PDFTransDirection2 -> Bool # | |
Document information
data PDFDocumentPageMode Source #
Document page mode
Constructors
| UseNone | |
| UseOutlines | |
| UseThumbs | |
| FullScreen |
Instances
| Show PDFDocumentPageMode Source # | |
Defined in Graphics.PDF.Draw Methods showsPrec :: Int -> PDFDocumentPageMode -> ShowS # show :: PDFDocumentPageMode -> String # showList :: [PDFDocumentPageMode] -> ShowS # | |
| Eq PDFDocumentPageMode Source # | |
Defined in Graphics.PDF.Draw Methods (==) :: PDFDocumentPageMode -> PDFDocumentPageMode -> Bool # (/=) :: PDFDocumentPageMode -> PDFDocumentPageMode -> Bool # | |
data PDFDocumentPageLayout Source #
Document page layout
Instances
| Show PDFDocumentPageLayout Source # | |
Defined in Graphics.PDF.Draw Methods showsPrec :: Int -> PDFDocumentPageLayout -> ShowS # show :: PDFDocumentPageLayout -> String # showList :: [PDFDocumentPageLayout] -> ShowS # | |
| Eq PDFDocumentPageLayout Source # | |
Defined in Graphics.PDF.Draw Methods (==) :: PDFDocumentPageLayout -> PDFDocumentPageLayout -> Bool # (/=) :: PDFDocumentPageLayout -> PDFDocumentPageLayout -> Bool # | |
data PDFViewerPreferences Source #
Viewer preferences
Constructors
| PDFViewerPreferences | |
Fields
| |
standardDocInfo :: PDFDocumentInfo Source #
No information for the document
Draw monad and drawing functions
Types
The drawing monad
Instances
| PDFGlobals Draw Source # | |
Defined in Graphics.PDF.Draw Methods bounds :: PDFXObject a => PDFReference a -> Draw (PDFFloat, PDFFloat) Source # | |
| Applicative Draw Source # | |
| Functor Draw Source # | |
| Monad Draw Source # | |
| MonadWriter Builder Draw Source # | |
class PDFXObject a where Source #
A PDF Xobject which can be drawn
Minimal complete definition
Nothing
Methods
drawXObject :: PDFReference a -> Draw () Source #
Instances
| PDFXObject PDFXForm Source # | |
Defined in Graphics.PDF.Draw Methods drawXObject :: PDFReference PDFXForm -> Draw () Source # privateDrawXObject :: PDFReference PDFXForm -> Draw () | |
| PDFXObject PDFJpeg Source # | |
Defined in Graphics.PDF.Image Methods drawXObject :: PDFReference PDFJpeg -> Draw () Source # privateDrawXObject :: PDFReference PDFJpeg -> Draw () | |
| PDFXObject RawImage Source # | |
Defined in Graphics.PDF.Image Methods drawXObject :: PDFReference RawImage -> Draw () Source # privateDrawXObject :: PDFReference RawImage -> Draw () | |
class PDFGlobals m where Source #
Methods
bounds :: PDFXObject a => PDFReference a -> m (PDFFloat, PDFFloat) Source #
Instances
| PDFGlobals Draw Source # | |
Defined in Graphics.PDF.Draw Methods bounds :: PDFXObject a => PDFReference a -> Draw (PDFFloat, PDFFloat) Source # | |
| PDFGlobals PDF Source # | |
Defined in Graphics.PDF.Draw Methods bounds :: PDFXObject a => PDFReference a -> PDF (PDFFloat, PDFFloat) Source # | |
General drawing functions
withNewContext :: Draw a -> Draw a Source #
Draw in a new drawing context without perturbing the previous context that is restored after the draw
emptyDrawing :: Draw () Source #
An empty drawing