HPDF-1.4: Generation of PDF documentsSource codeContentsIndex
Graphics.PDF.Document
Portabilityportable
Stabilityexperimental
Maintainermisc@NOSPAMalpheccar.org
Contents
Document actions
Special document objects
Page management
Page transitions
Document information
Draw monad and drawing functions
Types
General drawing functions
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)
data PDFTransition = PDFTransition !PDFFloat !PDFTransStyle
data PDFTransStyle
= Split PDFTransDimension PDFTransDirection
| Blinds PDFTransDimension
| Box PDFTransDirection
| Wipe PDFTransDirection2
| Dissolve
| Glitter PDFTransDirection2
data PDFTransDirection
= Inward
| Outward
data PDFTransDimension
= Horizontal
| Vertical
data PDFTransDirection2
= LeftToRight
| BottomToTop
| RightToLeft
| TopToBottom
| TopLeftToBottomRight
data PDFDocumentInfo = PDFDocumentInfo {
author :: PDFString
subject :: PDFString
pageMode :: PDFDocumentPageMode
pageLayout :: PDFDocumentPageLayout
viewerPreferences :: PDFViewerPreferences
compressed :: Bool
}
data PDFDocumentPageMode
= UseNone
| UseOutlines
| UseThumbs
| FullScreen
data PDFDocumentPageLayout
= SinglePage
| OneColumn
| TwoColumnLeft
| TwoColumnRight
| TwoPageLeft
| TwoPageRight
data PDFViewerPreferences = PDFViewerPreferences {
hideToolbar :: Bool
hideMenuBar :: Bool
hideWindowUI :: Bool
fitWindow :: Bool
centerWindow :: Bool
displayDoctitle :: Bool
nonFullScreenPageMode :: PDFDocumentPageMode
}
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
data PDFXForm Source
show/hide Instances
Page management
addPageSource
:: Maybe PDFRectPage size or default document's one
-> PDF (PDFReference PDFPage)Reference to the new page
Add a new page to a PDF document
addPageWithTransitionSource
:: Maybe PDFRectPage size or default document's one
-> Maybe PDFFloatOptional duration
-> Maybe PDFTransitionOptional transition
-> PDF (PDFReference PDFPage)Reference to the new page
drawWithPageSource
::
=> PDFReference PDFPagePage
-> Draw aDrawing commands
-> PDF a
Draw on a given page
createPDFXFormSource
::
=> PDFFloatLeft
-> PDFFloatBottom
-> PDFFloatRight
-> PDFFloatTop
-> Draw aDrawing commands
-> PDF (PDFReference PDFXForm)
Create a PDF XObject
Page transitions
data PDFTransition Source
A PDF Transition
Constructors
PDFTransition !PDFFloat !PDFTransStyle
show/hide Instances
data PDFTransStyle Source
Transition style
Constructors
Split PDFTransDimension PDFTransDirection
Blinds PDFTransDimension
Box PDFTransDirection
Wipe PDFTransDirection2
Dissolve
Glitter PDFTransDirection2
show/hide Instances
data PDFTransDirection Source
Direction of a transition
Constructors
Inward
Outward
show/hide Instances
data PDFTransDimension Source
Dimension of a transition
Constructors
Horizontal
Vertical
show/hide Instances
data PDFTransDirection2 Source
Direction of a transition
Constructors
LeftToRight
BottomToTopWipe only
RightToLeftWipe only
TopToBottom
TopLeftToBottomRightGlitter only
show/hide Instances
Document information
data PDFDocumentInfo Source
Document metadata
Constructors
PDFDocumentInfo
author :: PDFString
subject :: PDFString
pageMode :: PDFDocumentPageMode
pageLayout :: PDFDocumentPageLayout
viewerPreferences :: PDFViewerPreferences
compressed :: Bool
data PDFDocumentPageMode Source
Document page mode
Constructors
UseNone
UseOutlines
UseThumbs
FullScreen
show/hide Instances
data PDFDocumentPageLayout Source
Document page layout
Constructors
SinglePage
OneColumn
TwoColumnLeft
TwoColumnRight
TwoPageLeft
TwoPageRight
show/hide Instances
data PDFViewerPreferences Source
Viewer preferences
Constructors
PDFViewerPreferences
hideToolbar :: BoolTo hide the toolbar
hideMenuBar :: BoolTo hide the menubar
hideWindowUI :: BoolTo hide the window
fitWindow :: BoolFit window to screen
centerWindow :: BoolCenter window on screen
displayDoctitle :: BoolDisplay the docu,ent title
nonFullScreenPageMode :: PDFDocumentPageModeDisplay mode when exiting the full screen mode
show/hide Instances
standardDocInfo :: PDFDocumentInfoSource
No information for the document
standardViewerPrefs :: PDFViewerPreferencesSource
Draw monad and drawing functions
Types
data Draw a Source
The drawing monad
show/hide Instances
class PDFXObject a whereSource
A PDF Xobject which can be drawn
Methods
drawXObject :: PDFReference a -> Draw ()Source
show/hide Instances
class PDFGlobals m whereSource
Methods
bounds :: PDFXObject a => PDFReference a -> m (PDFFloat, PDFFloat)Source
show/hide Instances
General drawing functions
withNewContext :: Draw a -> Draw aSource
Draw in a new drawing context without perturbing the previous context that is restored after the draw
emptyDrawing :: Draw ()Source
An empty drawing
Produced by Haddock version 2.3.0