HPDF-1.3: Generation of PDF documentsContentsIndex
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 ()
bounds :: PDFReference a -> Draw (PDFFloat, PDFFloat)
withNewContext :: Draw a -> Draw a
emptyDrawing :: Draw ()
Document actions
Special document objects
data PDFXForm
show/hide Instances
PDFXObject PDFXForm
PdfObject PDFXForm
PdfResourceObject (PDFReference PDFXForm)
Page management
addPage
:: Maybe PDFRectPage size or default document's one
-> PDF (PDFReference PDFPage)Reference to the new page
Add a new page to a PDF document
addPageWithTransition
:: Maybe PDFRectPage size or default document's one
-> Maybe PDFFloatOptional duration
-> Maybe PDFTransitionOptional transition
-> PDF (PDFReference PDFPage)Reference to the new page
drawWithPage
:: PDFReference PDFPagePage
-> Draw aDrawing commands
-> PDF a
Draw on a given page
createPDFXForm
:: PDFFloatLeft
-> PDFFloatBottom
-> PDFFloatRight
-> PDFFloatTop
-> Draw aDrawing commands
-> PDF (PDFReference PDFXForm)
Create a PDF XObject
Page transitions
data PDFTransition
A PDF Transition
Constructors
PDFTransition !PDFFloat !PDFTransStyle
show/hide Instances
data PDFTransStyle
Transition style
Constructors
Split PDFTransDimension PDFTransDirection
Blinds PDFTransDimension
Box PDFTransDirection
Wipe PDFTransDirection2
Dissolve
Glitter PDFTransDirection2
show/hide Instances
data PDFTransDirection
Direction of a transition
Constructors
Inward
Outward
show/hide Instances
data PDFTransDimension
Dimension of a transition
Constructors
Horizontal
Vertical
show/hide Instances
data PDFTransDirection2
Direction of a transition
Constructors
LeftToRight
BottomToTopWipe only
RightToLeftWipe only
TopToBottom
TopLeftToBottomRightGlitter only
show/hide Instances
Document information
data PDFDocumentInfo
Document metadata
Constructors
PDFDocumentInfo
author :: PDFString
subject :: PDFString
pageMode :: PDFDocumentPageMode
pageLayout :: PDFDocumentPageLayout
viewerPreferences :: PDFViewerPreferences
compressed :: Bool
data PDFDocumentPageMode
Document page mode
Constructors
UseNone
UseOutlines
UseThumbs
FullScreen
show/hide Instances
data PDFDocumentPageLayout
Document page layout
Constructors
SinglePage
OneColumn
TwoColumnLeft
TwoColumnRight
TwoPageLeft
TwoPageRight
show/hide Instances
data PDFViewerPreferences
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 :: PDFDocumentInfo
No information for the document
standardViewerPrefs :: PDFViewerPreferences
Draw monad and drawing functions
Types
data Draw a
The drawing monad
show/hide Instances
class PDFXObject a where
A PDF Xobject which can be drawn
Methods
drawXObject :: PDFReference a -> Draw ()
bounds :: PDFReference a -> Draw (PDFFloat, PDFFloat)
show/hide Instances
General drawing functions
withNewContext :: Draw a -> Draw a
Draw in a new drawing context without perturbing the previous context that is restored after the draw
emptyDrawing :: Draw ()
An empty drawing
Produced by Haddock version 0.8