-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generation of PDF documents -- -- A PDF library with support for several pages, page transitions, -- outlines, annotations, compression, colors, shapes, patterns, jpegs, -- fonts, typesetting ... @package HPDF @version 1.4.1 -- | Hyphenate a string module Graphics.PDF.Hyphenate -- | Hyphenation databases data HyphenationDatabase English :: (Maybe (MapString [Int])) -> HyphenationDatabase CustomLanguage :: (MapString [Int]) -> (MapString [Int]) -> HyphenationDatabase data MapString v -- | Create a custom language for hyphenation mkCustomLanguage :: [String] -> [String] -> HyphenationDatabase mkExceptions :: [String] -> MapString [Int] -- | Hyphenate a string hyphenate :: HyphenationDatabase -> String -> [String] -- | PDF Actions module Graphics.PDF.Action class (PdfObject a) => Action a -- | Action of going to an URL newtype GoToURL GoToURL :: String -> GoToURL instance Action GoToURL instance PdfObject GoToURL -- | Coordinates for a PDF document module Graphics.PDF.Coordinates -- | Angle data Angle -- | Angle in degrees Degree :: !PDFFloat -> Angle -- | Angle in radians Radian :: !PDFFloat -> Angle type Point = Complex PDFFloat -- | A transformation matrix. An affine transformation a b c d e f -- --
-- a b 0 -- c d 0 -- e f 1 --data Matrix Matrix :: !PDFFloat -> !PDFFloat -> !PDFFloat -> !PDFFloat -> !PDFFloat -> !PDFFloat -> Matrix toRadian :: Angle -> PDFFloat -- | Dot product of two points 'dot (x :+ y) (a :+ b) == x * a + y * b' -- 'dot z w == magnitude z * magnitude w * cos (phase z - phase w)' dot :: (RealFloat t) => Complex t -> Complex t -> t scalePt :: (RealFloat t) => t -> Complex t -> Complex t -- | projects the first point onto the second project :: (RealFloat t) => Complex t -> Complex t -> Complex t -- | projects a point onto the x-axis projectX :: (RealFloat t) => Complex t -> Complex t -- | projects a point onto the y-axis projectY :: (RealFloat t) => Complex t -> Complex t -- | Specifies a matrix as three points pointMatrix :: Point -> Point -> Point -> Matrix -- | Applies a matrix to a point transform :: Matrix -> Point -> Point -- | Identity matrix identity :: Matrix -- | Rotation matrix rotate :: Angle -> Matrix -- | Translation matrix 'transform (translate z) w == z + w' translate :: Point -> Matrix -- | Scaling matrix scale :: PDFFloat -> PDFFloat -> Matrix spiral :: Point -> Matrix instance Eq Matrix instance Show Matrix instance Num Matrix -- | PDF Text module Graphics.PDF.Text data PDFFont PDFFont :: FontName -> FontSize -> PDFFont data FontName Helvetica :: FontName Helvetica_Bold :: FontName Helvetica_Oblique :: FontName Helvetica_BoldOblique :: FontName Times_Roman :: FontName Times_Bold :: FontName Times_Italic :: FontName Times_BoldItalic :: FontName Courier :: FontName Courier_Bold :: FontName Courier_Oblique :: FontName Courier_BoldOblique :: FontName Symbol :: FontName ZapfDingbats :: FontName -- | Rendering mode for text display data TextMode FillText :: TextMode StrokeText :: TextMode FillAndStrokeText :: TextMode InvisibleText :: TextMode FillTextAndAddToClip :: TextMode StrokeTextAndAddToClip :: TextMode FillAndStrokeTextAndAddToClip :: TextMode AddToClip :: TextMode -- | The text monad data PDFText a -- | Unscaled unit (not scaled by the font size) type UnscaledUnit = PDFFloat -- | Draw a text in the draw monad drawText :: PDFText a -> Draw a -- | Utility function to quickly display one line of text text :: PDFFont -> PDFFloat -> PDFFloat -> PDFString -> PDFText () -- | Create a PDF string from an Haskell one toPDFString :: String -> PDFString -- | Start a new line (leading value must have been set) startNewLine :: PDFText () -- | Display some text displayText :: PDFString -> PDFText () -- | Set position for the text beginning textStart :: PDFFloat -> PDFFloat -> PDFText () -- | Select a font to use setFont :: PDFFont -> PDFText () -- | Set leading value leading :: UnscaledUnit -> PDFText () -- | Set the additional char space charSpace :: UnscaledUnit -> PDFText () -- | Set the additional word space wordSpace :: UnscaledUnit -> PDFText () -- | Set scaling factor for text textScale :: PDFFloat -> PDFText () -- | Choose the text rendering mode renderMode :: TextMode -> PDFText () -- | Set the rise value rise :: UnscaledUnit -> PDFText () -- | Set the text transformation matrix setTextMatrix :: Matrix -> PDFText () textWidth :: PDFFont -> PDFString -> PDFFloat getDescent :: PDFFont -> PDFFloat getHeight :: PDFFont -> PDFFloat ripText :: PDFFont -> PDFString -> [(PDFFloat, Char)] charWidth :: PDFFont -> Char -> PDFFloat instance Eq TextMode instance Ord TextMode instance Enum TextMode instance Monad PDFText instance Functor PDFText instance MonadWriter Builder PDFText instance MonadState TextParameter PDFText instance MonadPath PDFText -- | PDF Annotations module Graphics.PDF.Annotation data TextAnnotation TextAnnotation :: PDFString -> [PDFFloat] -> TextIcon -> TextAnnotation data URLLink URLLink :: PDFString -> [PDFFloat] -> String -> Bool -> URLLink data PDFLink PDFLink :: PDFString -> [PDFFloat] -> (PDFReference PDFPage) -> PDFFloat -> PDFFloat -> Bool -> PDFLink data TextIcon Note :: TextIcon Paragraph :: TextIcon NewParagraph :: TextIcon Key :: TextIcon Comment :: TextIcon Help :: TextIcon Insert :: TextIcon -- | Create a new annotation object newAnnotation :: (PdfObject a, AnnotationObject a) => a -> Draw () instance Eq TextIcon instance Show TextIcon instance AnnotationObject PDFLink instance PdfObject PDFLink instance AnnotationObject URLLink instance PdfObject URLLink instance AnnotationObject TextAnnotation instance PdfObject TextAnnotation -- | PDF Patterns module Graphics.PDF.Pattern -- | Tiling type data TilingType ConstantSpacing :: TilingType NoDistortion :: TilingType ConstantSpacingAndFaster :: TilingType data PDFColoredPattern -- | A PDF Pattern data PDFUncoloredPattern -- | Create a colored tiling pattern createColoredTiling :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> TilingType -> Draw a -> PDF (PDFReference PDFColoredPattern) -- | Create an uncolored tiling pattern createUncoloredTiling :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> TilingType -> Draw a -> PDF (PDFReference PDFUncoloredPattern) -- | Set the fill pattern setColoredFillPattern :: PDFReference PDFColoredPattern -> Draw () -- | Set the stroke pattern setColoredStrokePattern :: PDFReference PDFColoredPattern -> Draw () -- | Set the fill pattern setUncoloredFillPattern :: PDFReference PDFUncoloredPattern -> Color -> Draw () -- | Set the stroke pattern setUncoloredStrokePattern :: PDFReference PDFUncoloredPattern -> Color -> Draw () instance Eq TilingType instance Enum TilingType instance Eq PaintType instance Enum PaintType -- | Colors for a PDF document module Graphics.PDF.Colors -- | A PDF color data Color Rgb :: !Double -> !Double -> !Double -> Color Hsv :: !Double -> !Double -> !Double -> Color -- | Init the PDF color space to RGB. setRGBColorSpace :: Draw () -- | Select the filling color fillColor :: (MonadPath m) => Color -> m () -- | Select the drawing color strokeColor :: (MonadPath m) => Color -> m () -- | Set alpha value for transparency setStrokeAlpha :: Double -> Draw () -- | Set alpha value for transparency setFillAlpha :: Double -> Draw () hsvToRgb :: (Double, Double, Double) -> (Double, Double, Double) black :: Color white :: Color red :: Color blue :: Color green :: Color -- | PDF Navigation module Graphics.PDF.Navigation data OutlineStyle NormalOutline :: OutlineStyle ItalicOutline :: OutlineStyle BoldOutline :: OutlineStyle -- | Create a new outline section pointing to the last created page newSection :: PDFString -> Maybe Color -> Maybe OutlineStyle -> PDF () -> PDF () -- | Create a new outline section pointing to a given page newSectionWithPage :: PDFString -> Maybe Color -> Maybe OutlineStyle -> PDFReference PDFPage -> PDF () -> PDF () -- | PDF Shapes module Graphics.PDF.Shapes -- | Move pen to a given point without drawing anything moveto :: Point -> Draw () -- | Draw a line from current point to the one specified by lineto lineto :: Point -> Draw () -- | Approximate a circular arc by one cubic bezier curve. larger arc -- angles mean larger distortions arcto :: Angle -> Point -> Draw () curveto :: Point -> Point -> Point -> Draw () -- | Begin a new path at a position beginPath :: Point -> Draw () -- | Close current path closePath :: Draw () -- | Append a cubic Bezier curve to the current path. The curve extends -- from the current point to the point (x3 , y3), using (x1 , y1 ) and -- (x2, y2) as the Bezier control points addBezierCubic :: Point -> Point -> Point -> Draw () -- | Add a polygon to current path addPolygonToPath :: [Point] -> Draw () addLineToPath :: Point -> Draw () -- | Draw current path strokePath :: Draw () -- | Fill current path fillPath :: Draw () -- | Fill current path fillAndStrokePath :: Draw () -- | Fill current path using even odd rule fillPathEO :: Draw () -- | Fill current path using even odd rule fillAndStrokePathEO :: Draw () -- | Set clipping path setAsClipPath :: Draw () -- | Set clipping path setAsClipPathEO :: Draw () class Shape a addShape :: (Shape a) => a -> Draw () stroke :: (Shape a) => a -> Draw () fill :: (Shape a) => a -> Draw () fillAndStroke :: (Shape a) => a -> Draw () fillEO :: (Shape a) => a -> Draw () fillAndStrokeEO :: (Shape a) => a -> Draw () data Line Line :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Line data Rectangle Rectangle :: !Point -> !Point -> Rectangle newtype Polygon Polygon :: [Point] -> Polygon data Arc Arc :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Arc data Ellipse Ellipse :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Ellipse data Circle Circle :: PDFFloat -> PDFFloat -> PDFFloat -> Circle data RoundRectangle RoundRectangle :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> RoundRectangle -- | Line cap styles data CapStyle ButtCap :: CapStyle RoundCap :: CapStyle SquareCap :: CapStyle -- | Line join styles data JoinStyle MiterJoin :: JoinStyle RoundJoin :: JoinStyle BevelJoin :: JoinStyle data DashPattern DashPattern :: ![PDFFloat] -> PDFFloat -> DashPattern -- | Set pen width setWidth :: (MonadPath m) => PDFFloat -> m () -- | Set line cap setLineCap :: (MonadPath m) => CapStyle -> m () -- | Set line join setLineJoin :: (MonadPath m) => JoinStyle -> m () -- | Set the dash pattern setDash :: (MonadPath m) => DashPattern -> m () -- | No dash pattern setNoDash :: (MonadPath m) => m () -- | Set pen width setMiterLimit :: (MonadPath m) => PDFFloat -> m () instance Eq DashPattern instance Eq JoinStyle instance Enum JoinStyle instance Eq CapStyle instance Enum CapStyle instance Eq Circle instance Eq RoundRectangle instance Eq Ellipse instance Eq Arc instance Eq Rectangle instance Eq Line instance Shape Polygon instance Shape Circle instance Shape RoundRectangle instance Shape Ellipse instance Shape Arc instance Shape Rectangle instance Shape Line -- | PDF shading module Graphics.PDF.Shading -- | A shading data PDFShading AxialShading :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Color -> Color -> PDFShading RadialShading :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Color -> Color -> PDFShading paintWithShading :: PDFShading -> Draw a -> Draw () -- | Fill clipping region with a shading applyShading :: PDFShading -> Draw () -- | Experimental typesetting. It is a work in progress module Graphics.PDF.Typesetting -- | A box is an object with dimensions and used in the typesetting process class Box a boxWidth :: (Box a) => a -> PDFFloat boxHeight :: (Box a) => a -> PDFFloat boxDescent :: (Box a) => a -> PDFFloat boxAscent :: (Box a) => a -> PDFFloat -- | A box that can be displayed class DisplayableBox a strokeBox :: (DisplayableBox a) => a -> PDFFloat -> PDFFloat -> Draw () -- | A letter which can be anything. Sizes are widths and for glue the -- dilation and compression factors For the generic letter, height and -- descent are also provided data Letter s -- | Any box as a letter Letter :: BoxDimension -> !AnyBox -> !Maybe s -> Letter s -- | A glue with style to know if it is part of the same sentence Glue :: !PDFFloat -> !PDFFloat -> !PDFFloat -> !Maybe s -> Letter s -- | Hyphen point FlaggedPenalty :: !PDFFloat -> !Int -> !s -> Letter s -- | Penalty Penalty :: !Int -> Letter s -- | A char AChar :: !s -> !Char -> !PDFFloat -> Letter s -- | A kern : non dilatable and non breakable glue Kern :: !PDFFloat -> !Maybe s -> Letter s -- | Dimension of a box : width, height and descent type BoxDimension = (PDFFloat, PDFFloat, PDFFloat) -- | Style of text (sentences and words). Minimum definition textStyle class (ComparableStyle a) => Style a sentenceStyle :: (Style a) => a -> Maybe (Rectangle -> Draw b -> Draw ()) wordStyle :: (Style a) => a -> Maybe (Rectangle -> StyleFunction -> Draw b -> Draw ()) textStyle :: (Style a) => a -> TextStyle updateStyle :: (Style a) => a -> a styleHeight :: (Style a) => a -> PDFFloat styleDescent :: (Style a) => a -> PDFFloat -- | Text style used by PDF operators data TextStyle TextStyle :: !PDFFont -> !Color -> !Color -> !TextMode -> !PDFFloat -> !PDFFloat -> !PDFFloat -> !PDFFloat -> TextStyle textFont :: TextStyle -> !PDFFont textStrokeColor :: TextStyle -> !Color textFillColor :: TextStyle -> !Color textMode :: TextStyle -> !TextMode penWidth :: TextStyle -> !PDFFloat -- | Scaling factor for normal space size (scale also the dilation and -- compression factors) scaleSpace :: TextStyle -> !PDFFloat -- | Scale the dilation factor of glues scaleDilatation :: TextStyle -> !PDFFloat -- | Scale the compression factor of glues scaleCompression :: TextStyle -> !PDFFloat -- | What kind of style drawing function is required for a word when word -- styling is enabled data StyleFunction -- | Must style a word DrawWord :: StyleFunction -- | Must style a glue DrawGlue :: StyleFunction -- | Paragraph style class (ComparableStyle a, Style s) => ParagraphStyle a s | a -> s lineWidth :: (ParagraphStyle a s) => a -> PDFFloat -> Int -> PDFFloat linePosition :: (ParagraphStyle a s) => a -> PDFFloat -> Int -> PDFFloat interline :: (ParagraphStyle a s) => a -> Maybe (Rectangle -> Draw ()) paragraphChange :: (ParagraphStyle a s) => a -> Int -> [Letter s] -> (a, [Letter s]) paragraphStyle :: (ParagraphStyle a s) => a -> Maybe (Rectangle -> Draw b -> Draw ()) -- | A MonadStyle where some typesetting operators can be used class (Style s, Monad m) => MonadStyle s m | m -> s setStyle :: (MonadStyle s m) => s -> m () currentStyle :: (MonadStyle s m) => m s addBox :: (MonadStyle s m, Show a, DisplayableBox a, Box a) => a -> PDFFloat -> PDFFloat -> PDFFloat -> m () glue :: (MonadStyle s m) => PDFFloat -> PDFFloat -> PDFFloat -> m () unstyledGlue :: (MonadStyle s m) => PDFFloat -> PDFFloat -> PDFFloat -> m () -- | Used to compare two style without taking into account the style state class ComparableStyle a isSameStyleAs :: (ComparableStyle a) => a -> a -> Bool data Para s a data TM ps s a data VBox ps s data VerState s VerState :: !(PDFFloat, PDFFloat, PDFFloat) -> !(PDFFloat, PDFFloat, PDFFloat) -> !PDFFloat -> !s -> VerState s -- | Default value (12,0.17,0.0) baselineskip :: VerState s -> !(PDFFloat, PDFFloat, PDFFloat) -- | Default value (3.0,0.33,0.0) lineskip :: VerState s -> !(PDFFloat, PDFFloat, PDFFloat) -- | Default value 2 lineskiplimit :: VerState s -> !PDFFloat currentParagraphStyle :: VerState s -> !s -- | Container for vboxes (x,y,width,maxheight,height,currenty,current z, -- tolerance para) tolerance para means a paragraph is not started if too -- close from the bottom edge of the box data Container ps s data Justification FullJustification :: Justification Centered :: Justification LeftJustification :: Justification RightJustification :: Justification data Orientation E :: Orientation W :: Orientation N :: Orientation S :: Orientation NE :: Orientation NW :: Orientation SE :: Orientation SW :: Orientation -- | Display a formatted text in a given bounding rectangle with a given -- default paragraph style, a given default text style. No clipping is -- taking place. Drawing stop when the last line is crossing the bounding -- rectangle in vertical direction displayFormattedText :: (ParagraphStyle ps s) => Rectangle -> ps -> s -> TM ps s a -> Draw a -- | Add a text line txt :: (Style s) => String -> Para s () -- | add a kern (space that can be dilated or compressed and on which no -- line breaking can occur) kern :: (Style s) => PDFFloat -> Para s () -- | Add a penalty addPenalty :: Int -> Para s () -- | Make a letter from any box mkLetter :: (Show a, Box a, DisplayableBox a) => BoxDimension -> Maybe s -> a -> Letter s -- | Make a drawing box. A box object containing a Draw value mkDrawBox :: Draw () -> DrawBox -- | For a newline and end the current paragraph forceNewLine :: (Style s) => Para s () -- | Add a new paragraph to the text paragraph :: (Style s) => Para s a -> TM ps s a endPara :: (Style s) => Para s () startPara :: (Style s) => Para s () -- | Get the current paragraph style getParaStyle :: TM ps s ps -- | Change the current paragraph style setParaStyle :: (ParagraphStyle ps s) => ps -> TM ps s () -- | Create a empty container to constraint the amount of line that can be -- displayed mkContainer :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Container ps s -- | Fill a container with lines fillContainer :: (ParagraphStyle ps s, ComparableStyle ps) => VerState ps -> Container ps s -> [VBox ps s] -> (Draw (), Container ps s, [VBox ps s]) -- | Default vertical state -- --
-- Default values -- baselineskip = (12,0.17,0.0) -- lineskip = (3.0,0.33,0.0) -- lineskiplimit = 2 --defaultVerState :: s -> VerState s -- | Return the list of Vboxes for a text getBoxes :: (ParagraphStyle ps s) => ps -> s -> TM ps s a -> [VBox ps s] -- | Container horizontal position containerX :: Container ps s -> PDFFloat -- | Container vertical position containerY :: Container ps s -> PDFFloat -- | Get the width of the container containerWidth :: Container ps s -> PDFFloat -- | Get the height of the container containerHeight :: Container ps s -> PDFFloat -- | Get the content height of the container with glue dilatation containerContentHeight :: Container ps s -> PDFFloat -- | Get the maximum right border of the container content (maybe bigger -- than container width due to overfull lines) containerContentRightBorder :: Container ps s -> PDFFloat -- | Get the minimum left border of the container content containerContentLeftBorder :: Container ps s -> PDFFloat -- | Get the current height of the container without glue dilatation containerCurrentHeight :: Container ps s -> PDFFloat -- | Return the rectangle containing the text after formatting and glue -- dilatation containerContentRectangle :: Container ps s -> Rectangle -- | Draw a text box with relative position. Useful for labels drawTextBox :: (ParagraphStyle ps s, Style s) => PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Orientation -> ps -> s -> TM ps s a -> (Rectangle, Draw ()) setFirstPassTolerance :: PDFFloat -> TM ps s () setSecondPassTolerance :: PDFFloat -> TM ps s () setHyphenPenaltyValue :: Int -> TM ps s () setFitnessDemerit :: PDFFloat -> TM ps s () setHyphenDemerit :: PDFFloat -> TM ps s () setLinePenalty :: PDFFloat -> TM ps s () getFirstPassTolerance :: TM ps s PDFFloat getSecondPassTolerance :: TM ps s PDFFloat getHyphenPenaltyValue :: TM ps s Int getFitnessDemerit :: TM ps s PDFFloat getHyphenDemerit :: TM ps s PDFFloat getLinePenalty :: TM ps s PDFFloat setJustification :: Justification -> TM ps s () setBaseLineSkip :: PDFFloat -> PDFFloat -> PDFFloat -> TM ps s () setLineSkipLimit :: PDFFloat -> TM ps s () setLineSkip :: PDFFloat -> PDFFloat -> PDFFloat -> TM ps s () getBaseLineSkip :: TM ps s (PDFFloat, PDFFloat, PDFFloat) getLineSkipLimit :: TM ps s PDFFloat getLineSkip :: TM ps s (PDFFloat, PDFFloat, PDFFloat) -- | Standard styles for sentences data StandardStyle Font :: PDFFont -> Color -> Color -> StandardStyle -- | Standard styles for paragraphs data StandardParagraphStyle NormalParagraph :: StandardParagraphStyle instance Eq Orientation instance Show Orientation instance Monad (Para s) instance MonadWriter [Letter s] (Para s) instance MonadReader BRState (Para s) instance MonadState s (Para s) instance Functor (Para s) instance Monad (TM ps s) instance MonadWriter [VBox ps s] (TM ps s) instance MonadState (TMState ps s) (TM ps s) instance Functor (TM ps s) instance (Style s) => MonadStyle s (Para s) instance (Style s) => MonadStyle s (TM ps s) -- | Management of the PDF structure module Graphics.PDF.Document data PDFXForm -- | Add a new page to a PDF document addPage :: Maybe PDFRect -> PDF (PDFReference PDFPage) addPageWithTransition :: Maybe PDFRect -> Maybe PDFFloat -> Maybe PDFTransition -> PDF (PDFReference PDFPage) -- | Draw on a given page drawWithPage :: PDFReference PDFPage -> Draw a -> PDF a -- | Create a PDF XObject createPDFXForm :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Draw a -> PDF (PDFReference PDFXForm) -- | A PDF Transition data PDFTransition PDFTransition :: !PDFFloat -> !PDFTransStyle -> PDFTransition -- | Transition style data PDFTransStyle Split :: PDFTransDimension -> PDFTransDirection -> PDFTransStyle Blinds :: PDFTransDimension -> PDFTransStyle Box :: PDFTransDirection -> PDFTransStyle Wipe :: PDFTransDirection2 -> PDFTransStyle Dissolve :: PDFTransStyle Glitter :: PDFTransDirection2 -> PDFTransStyle -- | Direction of a transition data PDFTransDirection Inward :: PDFTransDirection Outward :: PDFTransDirection -- | Dimension of a transition data PDFTransDimension Horizontal :: PDFTransDimension Vertical :: PDFTransDimension -- | Direction of a transition data PDFTransDirection2 LeftToRight :: PDFTransDirection2 -- | Wipe only BottomToTop :: PDFTransDirection2 -- | Wipe only RightToLeft :: PDFTransDirection2 TopToBottom :: PDFTransDirection2 -- | Glitter only TopLeftToBottomRight :: PDFTransDirection2 -- | Document metadata data PDFDocumentInfo PDFDocumentInfo :: PDFString -> PDFString -> PDFDocumentPageMode -> PDFDocumentPageLayout -> PDFViewerPreferences -> Bool -> PDFDocumentInfo author :: PDFDocumentInfo -> PDFString subject :: PDFDocumentInfo -> PDFString pageMode :: PDFDocumentInfo -> PDFDocumentPageMode pageLayout :: PDFDocumentInfo -> PDFDocumentPageLayout viewerPreferences :: PDFDocumentInfo -> PDFViewerPreferences compressed :: PDFDocumentInfo -> Bool -- | Document page mode data PDFDocumentPageMode UseNone :: PDFDocumentPageMode UseOutlines :: PDFDocumentPageMode UseThumbs :: PDFDocumentPageMode FullScreen :: PDFDocumentPageMode -- | Document page layout data PDFDocumentPageLayout SinglePage :: PDFDocumentPageLayout OneColumn :: PDFDocumentPageLayout TwoColumnLeft :: PDFDocumentPageLayout TwoColumnRight :: PDFDocumentPageLayout TwoPageLeft :: PDFDocumentPageLayout TwoPageRight :: PDFDocumentPageLayout -- | Viewer preferences data PDFViewerPreferences PDFViewerPreferences :: Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> PDFDocumentPageMode -> PDFViewerPreferences -- | To hide the toolbar hideToolbar :: PDFViewerPreferences -> Bool -- | To hide the menubar hideMenuBar :: PDFViewerPreferences -> Bool -- | To hide the window hideWindowUI :: PDFViewerPreferences -> Bool -- | Fit window to screen fitWindow :: PDFViewerPreferences -> Bool -- | Center window on screen centerWindow :: PDFViewerPreferences -> Bool -- | Display the docu,ent title displayDoctitle :: PDFViewerPreferences -> Bool -- | Display mode when exiting the full screen mode nonFullScreenPageMode :: PDFViewerPreferences -> PDFDocumentPageMode -- | No information for the document standardDocInfo :: PDFDocumentInfo standardViewerPrefs :: PDFViewerPreferences -- | The drawing monad data Draw a -- | A PDF Xobject which can be drawn class PDFXObject a drawXObject :: (PDFXObject a) => PDFReference a -> Draw () class PDFGlobals m bounds :: (PDFGlobals m, PDFXObject a) => PDFReference a -> m (PDFFloat, PDFFloat) -- | Draw in a new drawing context without perturbing the previous context -- that is restored after the draw withNewContext :: Draw a -> Draw a -- | An empty drawing emptyDrawing :: Draw () -- | PDF Images module Graphics.PDF.Image -- | A Jpeg PDF object data PDFJpeg -- | A Jpeg file data JpegFile -- | Use an abstract description of a Jpeg to return a PDFReference that -- can be used to manipulate the Jpeg in the context of the PDF document createPDFJpeg :: JpegFile -> PDF (PDFReference PDFJpeg) -- | Read a JPEG file and return an abstract description of its content or -- an error The read is not lazy. The whole image will be loaded into -- memory readJpegFile :: FilePath -> IO (Either String JpegFile) -- | Get the JPEG bounds jpegBounds :: JpegFile -> (PDFFloat, PDFFloat) instance Monad FA instance MonadError String FA instance Functor FA instance PdfResourceObject (PDFReference PDFJpeg) instance PdfObject PDFJpeg instance PDFXObject PDFJpeg -- | Generation of PDF documents module Graphics.PDF -- | The PDF Monad data PDF a -- | Generates a PDF document runPdf :: String -> PDFDocumentInfo -> PDFRect -> PDF a -> IO () -- | A PDF rectangle data PDFRect PDFRect :: !Int -> !Int -> !Int -> !Int -> PDFRect -- | A real number in a PDF document type PDFFloat = Double -- | A reference to a PDF object data PDFReference s -- | A PDFString containing a strict bytestring data PDFString -- | A PDF Page object data PDFPage -- | List of all pages data Pages -- | Apply a transformation matrix to the current coordinate frame applyMatrix :: Matrix -> Draw () instance PdfObject PDFTrailer