-- 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 ... Have a look at the -- Graphics.PDF.Documentation module to see how to use it. Or, -- download the package and look at the test.hs file in the Test folder. -- That file is giving an example of each feature. @package HPDF @version 1.7 -- | Quick documentation for the PDF library. -- -- For detailed examples, download the tar.gz package from Hackage and -- look at the test.hs in folder Test. module Graphics.PDF.Documentation -- | PDF expressions and functions module Graphics.PDF.Expression newtype PDFExpression a PDFExpression :: ExprMonad () -> PDFExpression a class Function f class (Function a) => Result a class Argument a serialize :: Function f => f -> ByteString (==%) :: Eq a => PDFExpression a -> PDFExpression a -> PDFExpression Bool infix 4 ==% (/=%) :: Eq a => PDFExpression a -> PDFExpression a -> PDFExpression Bool infix 4 /=% (<%) :: Ord a => PDFExpression a -> PDFExpression a -> PDFExpression Bool infix 4 <% (>=%) :: Ord a => PDFExpression a -> PDFExpression a -> PDFExpression Bool infix 4 >=% (>%) :: Ord a => PDFExpression a -> PDFExpression a -> PDFExpression Bool infix 4 >% (<=%) :: Ord a => PDFExpression a -> PDFExpression a -> PDFExpression Bool infix 4 <=% min :: Ord a => PDFExpression a -> PDFExpression a -> PDFExpression a max :: Ord a => PDFExpression a -> PDFExpression a -> PDFExpression a true :: PDFExpression Bool false :: PDFExpression Bool (&&*) :: PDFExpression Bool -> PDFExpression Bool -> PDFExpression Bool infixr 3 &&* (||*) :: PDFExpression Bool -> PDFExpression Bool -> PDFExpression Bool infixr 2 ||* not :: PDFExpression Bool -> PDFExpression Bool ifThenElse :: Ord a => PDFExpression Bool -> PDFExpression a -> PDFExpression a -> PDFExpression a sqrt :: Floating a => PDFExpression a -> PDFExpression a sinDeg :: Floating a => PDFExpression a -> PDFExpression a cosDeg :: Floating a => PDFExpression a -> PDFExpression a log :: Floating a => PDFExpression a -> PDFExpression a log10 :: Floating a => PDFExpression a -> PDFExpression a pow :: Floating a => PDFExpression a -> PDFExpression a -> PDFExpression a atan2Deg :: Floating a => PDFExpression a -> PDFExpression a -> PDFExpression a floor :: RealFrac a => PDFExpression a -> PDFExpression Int ceiling :: RealFrac a => PDFExpression a -> PDFExpression Int round :: RealFrac a => PDFExpression a -> PDFExpression Int truncate :: RealFrac a => PDFExpression a -> PDFExpression Int instance GHC.Show.Show Graphics.PDF.Expression.Token instance (Graphics.PDF.Expression.Argument a, Graphics.PDF.Expression.Function f) => Graphics.PDF.Expression.Function (a -> f) instance Graphics.PDF.Expression.Argument (Graphics.PDF.Expression.PDFExpression a) instance (Graphics.PDF.Expression.Argument a, Graphics.PDF.Expression.Argument b) => Graphics.PDF.Expression.Argument (a, b) instance (Graphics.PDF.Expression.Argument a, Graphics.PDF.Expression.Argument b, Graphics.PDF.Expression.Argument c) => Graphics.PDF.Expression.Argument (a, b, c) instance (Graphics.PDF.Expression.Argument a, Graphics.PDF.Expression.Argument b, Graphics.PDF.Expression.Argument c, Graphics.PDF.Expression.Argument d) => Graphics.PDF.Expression.Argument (a, b, c, d) instance Graphics.PDF.Expression.Function (Graphics.PDF.Expression.PDFExpression a) instance (Graphics.PDF.Expression.Result a, Graphics.PDF.Expression.Result b) => Graphics.PDF.Expression.Function (a, b) instance (Graphics.PDF.Expression.Result a, Graphics.PDF.Expression.Result b, Graphics.PDF.Expression.Result c) => Graphics.PDF.Expression.Function (a, b, c) instance (Graphics.PDF.Expression.Result a, Graphics.PDF.Expression.Result b, Graphics.PDF.Expression.Result c, Graphics.PDF.Expression.Result d) => Graphics.PDF.Expression.Function (a, b, c, d) instance Graphics.PDF.Expression.Result (Graphics.PDF.Expression.PDFExpression a) instance (Graphics.PDF.Expression.Result a, Graphics.PDF.Expression.Result b) => Graphics.PDF.Expression.Result (a, b) instance (Graphics.PDF.Expression.Result a, Graphics.PDF.Expression.Result b, Graphics.PDF.Expression.Result c) => Graphics.PDF.Expression.Result (a, b, c) instance (Graphics.PDF.Expression.Result a, Graphics.PDF.Expression.Result b, Graphics.PDF.Expression.Result c, Graphics.PDF.Expression.Result d) => Graphics.PDF.Expression.Result (a, b, c, d) instance GHC.Num.Num a => GHC.Num.Num (Graphics.PDF.Expression.PDFExpression a) instance GHC.Real.Fractional a => GHC.Real.Fractional (Graphics.PDF.Expression.PDFExpression a) -- | Private types for the fonts module Graphics.PDF.Fonts.FontTypes newtype GlyphSize GlyphSize :: Int -> GlyphSize type FontSize = Int data FontStructure FS :: String -> !GlyphSize -> !GlyphSize -> !GlyphSize -> Map GlyphCode GlyphSize -> Map GlyphPair GlyphSize -> Maybe GlyphCode -> !GlyphCode -> Map Char GlyphCode -> [PDFFloat] -> !PDFFloat -> !GlyphSize -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> FontStructure [baseFont] :: FontStructure -> String [descent] :: FontStructure -> !GlyphSize [ascent] :: FontStructure -> !GlyphSize [height] :: FontStructure -> !GlyphSize [widthData] :: FontStructure -> Map GlyphCode GlyphSize [kernMetrics] :: FontStructure -> Map GlyphPair GlyphSize [hyphen] :: FontStructure -> Maybe GlyphCode [space] :: FontStructure -> !GlyphCode [encoding] :: FontStructure -> Map Char GlyphCode [fontBBox] :: FontStructure -> [PDFFloat] [italicAngle] :: FontStructure -> !PDFFloat [capHeight] :: FontStructure -> !GlyphSize [fixedPitch] :: FontStructure -> !Bool [serif] :: FontStructure -> !Bool [symbolic] :: FontStructure -> !Bool [script] :: FontStructure -> !Bool [nonSymbolic] :: FontStructure -> !Bool [italic] :: FontStructure -> !Bool [allCap] :: FontStructure -> !Bool [smallCap] :: FontStructure -> !Bool [forceBold] :: FontStructure -> !Bool data GlyphPair GlyphPair :: !GlyphCode -> !GlyphCode -> GlyphPair newtype GlyphCode GlyphCode :: Word8 -> GlyphCode data FontData Type1Data :: ByteString -> FontData mkFlags :: FontStructure -> Word32 instance GHC.Show.Show Graphics.PDF.Fonts.FontTypes.GlyphSize instance GHC.Real.Real Graphics.PDF.Fonts.FontTypes.GlyphSize instance GHC.Enum.Enum Graphics.PDF.Fonts.FontTypes.GlyphSize instance GHC.Real.Integral Graphics.PDF.Fonts.FontTypes.GlyphSize instance GHC.Num.Num Graphics.PDF.Fonts.FontTypes.GlyphSize instance GHC.Classes.Ord Graphics.PDF.Fonts.FontTypes.GlyphSize instance GHC.Classes.Eq Graphics.PDF.Fonts.FontTypes.GlyphSize instance GHC.Show.Show Graphics.PDF.Fonts.FontTypes.GlyphPair instance GHC.Classes.Ord Graphics.PDF.Fonts.FontTypes.GlyphPair instance GHC.Classes.Eq Graphics.PDF.Fonts.FontTypes.GlyphPair instance GHC.Show.Show Graphics.PDF.Fonts.FontTypes.FontStructure -- | 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 GHC.Show.Show Graphics.PDF.Coordinates.Matrix instance GHC.Classes.Ord Graphics.PDF.Coordinates.Matrix instance GHC.Classes.Eq Graphics.PDF.Coordinates.Matrix instance GHC.Num.Num Graphics.PDF.Coordinates.Matrix -- | PDF Actions module Graphics.PDF.Action class PdfObject a => Action a -- | Action of going to an URL newtype GoToURL GoToURL :: URI -> GoToURL instance Graphics.PDF.LowLevel.Types.PdfObject Graphics.PDF.Action.GoToURL instance Graphics.PDF.Action.Action Graphics.PDF.Action.GoToURL instance Graphics.PDF.LowLevel.Types.PdfLengthInfo Graphics.PDF.Action.GoToURL -- | PDF Font module Graphics.PDF.Fonts.Font class IsFont f name :: IsFont f => f -> String getDescent :: IsFont f => f -> FontSize -> PDFFloat getHeight :: IsFont f => f -> FontSize -> PDFFloat getKern :: IsFont f => f -> FontSize -> GlyphCode -> GlyphCode -> PDFFloat glyphWidth :: IsFont f => f -> FontSize -> GlyphCode -> PDFFloat hyphenGlyph :: IsFont f => f -> Maybe GlyphCode spaceGlyph :: IsFont f => f -> GlyphCode charGlyph :: IsFont f => f -> Char -> GlyphCode data GlyphSize type FontSize = Int data PDFFont PDFFont :: AnyFont -> FontSize -> PDFFont data AnyFont AnyFont :: f -> AnyFont data FontStructure data EmbeddedFont data FontData emptyFontStructure :: FontStructure fontSize :: PDFFont -> FontSize trueSize :: Int -> GlyphSize -> PDFFloat readFontData :: FilePath -> IO FontData instance GHC.Classes.Eq Graphics.PDF.Fonts.Font.PDFFont instance GHC.Show.Show Graphics.PDF.Fonts.Font.AnyFont instance GHC.Classes.Ord Graphics.PDF.Fonts.Font.PDFFont instance Graphics.PDF.Resources.PdfResourceObject Graphics.PDF.Fonts.Font.AnyFont instance Graphics.PDF.Fonts.Font.IsFont Graphics.PDF.Fonts.Font.AnyFont instance GHC.Classes.Eq Graphics.PDF.Fonts.Font.AnyFont instance GHC.Classes.Ord Graphics.PDF.Fonts.Font.AnyFont -- | PDF Font module Graphics.PDF.Fonts.Type1 class IsFont f data GlyphSize data Type1Font Type1Font :: FontStructure -> PDFReference EmbeddedFont -> Type1Font data AFMData data Type1FontStructure Type1FontStructure :: FontData -> FontStructure -> Type1FontStructure readAfmData :: FilePath -> IO (Either ParseError AFMData) parseAfmData :: ByteString -> Either ParseError AFMData mkType1FontStructure :: FontData -> AFMData -> IO Type1FontStructure instance GHC.Show.Show Graphics.PDF.Fonts.Type1.Type1Font instance GHC.Show.Show Graphics.PDF.Fonts.Type1.AFMData instance Graphics.PDF.Fonts.Font.IsFont Graphics.PDF.Fonts.Type1.Type1Font instance Graphics.PDF.Resources.PdfResourceObject Graphics.PDF.Fonts.Type1.Type1Font -- | PDF Font module Graphics.PDF.Fonts.StandardFont class IsFont f data GlyphSize 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 data StdFont StdFont :: FontStructure -> StdFont mkStdFont :: FontName -> IO (Either ParseError AnyFont) embeddedFont :: FontName -> ByteString instance GHC.Enum.Enum Graphics.PDF.Fonts.StandardFont.FontName instance GHC.Classes.Ord Graphics.PDF.Fonts.StandardFont.FontName instance GHC.Classes.Eq Graphics.PDF.Fonts.StandardFont.FontName instance GHC.Show.Show Graphics.PDF.Fonts.StandardFont.StdFont instance Graphics.PDF.Resources.PdfResourceObject Graphics.PDF.Fonts.StandardFont.StdFont instance Graphics.PDF.Fonts.Font.IsFont Graphics.PDF.Fonts.StandardFont.StdFont instance GHC.Show.Show Graphics.PDF.Fonts.StandardFont.FontName -- | 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 GHC.Enum.Enum Graphics.PDF.Pattern.PaintType instance GHC.Classes.Eq Graphics.PDF.Pattern.PaintType instance GHC.Enum.Enum Graphics.PDF.Pattern.TilingType instance GHC.Classes.Eq Graphics.PDF.Pattern.TilingType -- | 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 :: Text -> Maybe Color -> Maybe OutlineStyle -> PDF () -> PDF () -- | Create a new outline section pointing to a given page newSectionWithPage :: Text -> Maybe Color -> Maybe OutlineStyle -> PDFReference PDFPage -> PDF () -> PDF () -- | PDF Images module Graphics.PDF.Image -- | A Jpeg PDF object data PDFJpeg -- | A Jpeg file data JpegFile -- | A raw image data RawImage data PDFFilter ASCIIHexDecode :: PDFFilter ASCII85Decode :: PDFFilter LZWDecode :: PDFFilter FlateDecode :: PDFFilter RunLengthDecode :: PDFFilter CCITTFaxDecode :: PDFFilter DCTDecode :: PDFFilter NoFilter :: PDFFilter -- | 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 -> (Int, Int) -- | Reads a data URL string, and returns a JpegFile. The incoming string -- must be a correctly formatted data URL for a JPEG. You can convert -- jpeg files to data URLs at the following web site: -- http://dataurl.net/#dataurlmaker readJpegDataURL :: String -> Either String JpegFile createPDFRawImageFromARGB :: Int -> Int -> Bool -> Vector Word32 -> PDF (PDFReference RawImage) createPDFRawImageFromByteString :: Int -> Int -> Bool -> PDFFilter -> ByteString -> PDF (PDFReference RawImage) instance GHC.Base.Functor Graphics.PDF.Image.FA instance Control.Monad.Error.Class.MonadError GHC.Base.String Graphics.PDF.Image.FA instance GHC.Base.Applicative Graphics.PDF.Image.FA instance GHC.Base.Monad Graphics.PDF.Image.FA instance Graphics.PDF.Draw.PDFXObject Graphics.PDF.Image.RawImage instance Graphics.PDF.LowLevel.Types.PdfObject Graphics.PDF.Image.RawImage instance Graphics.PDF.LowLevel.Types.PdfLengthInfo Graphics.PDF.Image.RawImage instance Graphics.PDF.Resources.PdfResourceObject (Graphics.PDF.LowLevel.Types.PDFReference Graphics.PDF.Image.RawImage) instance Graphics.PDF.Draw.PDFXObject Graphics.PDF.Image.PDFJpeg instance Graphics.PDF.LowLevel.Types.PdfObject Graphics.PDF.Image.PDFJpeg instance Graphics.PDF.LowLevel.Types.PdfLengthInfo Graphics.PDF.Image.PDFJpeg instance Graphics.PDF.Resources.PdfResourceObject (Graphics.PDF.LowLevel.Types.PDFReference Graphics.PDF.Image.PDFJpeg) -- | PDF Annotations module Graphics.PDF.Annotation data TextAnnotation TextAnnotation :: Text -> [PDFFloat] -> TextIcon -> TextAnnotation data URLLink URLLink :: Text -> [PDFFloat] -> URI -> Bool -> URLLink data PDFLink PDFLink :: Text -> [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 () toAsciiString :: String -> AsciiString instance GHC.Show.Show Graphics.PDF.Annotation.TextIcon instance GHC.Classes.Eq Graphics.PDF.Annotation.TextIcon instance Graphics.PDF.LowLevel.Types.PdfObject Graphics.PDF.Annotation.PDFLink instance Graphics.PDF.LowLevel.Types.PdfLengthInfo Graphics.PDF.Annotation.PDFLink instance Graphics.PDF.Draw.AnnotationObject Graphics.PDF.Annotation.PDFLink instance Graphics.PDF.LowLevel.Types.PdfObject Graphics.PDF.Annotation.URLLink instance Graphics.PDF.LowLevel.Types.PdfLengthInfo Graphics.PDF.Annotation.URLLink instance Graphics.PDF.Draw.AnnotationObject Graphics.PDF.Annotation.URLLink instance Graphics.PDF.LowLevel.Types.PdfObject Graphics.PDF.Annotation.TextAnnotation instance Graphics.PDF.LowLevel.Types.PdfLengthInfo Graphics.PDF.Annotation.TextAnnotation instance Graphics.PDF.Draw.AnnotationObject Graphics.PDF.Annotation.TextAnnotation -- | 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 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 GHC.Classes.Eq Graphics.PDF.Shapes.Line instance GHC.Classes.Eq Graphics.PDF.Shapes.Rectangle instance GHC.Classes.Eq Graphics.PDF.Shapes.Arc instance GHC.Classes.Eq Graphics.PDF.Shapes.Ellipse instance GHC.Classes.Eq Graphics.PDF.Shapes.RoundRectangle instance GHC.Classes.Eq Graphics.PDF.Shapes.Circle instance GHC.Enum.Enum Graphics.PDF.Shapes.CapStyle instance GHC.Classes.Eq Graphics.PDF.Shapes.CapStyle instance GHC.Enum.Enum Graphics.PDF.Shapes.JoinStyle instance GHC.Classes.Eq Graphics.PDF.Shapes.JoinStyle instance GHC.Classes.Eq Graphics.PDF.Shapes.DashPattern instance Graphics.PDF.Shapes.Shape Graphics.PDF.Shapes.Polygon instance Graphics.PDF.Shapes.Shape Graphics.PDF.Shapes.Circle instance Graphics.PDF.Shapes.Shape Graphics.PDF.Shapes.RoundRectangle instance Graphics.PDF.Shapes.Shape Graphics.PDF.Shapes.Ellipse instance Graphics.PDF.Shapes.Shape Graphics.PDF.Shapes.Arc instance Graphics.PDF.Shapes.Shape Graphics.PDF.Shapes.Rectangle instance Graphics.PDF.Shapes.Shape Graphics.PDF.Shapes.Line -- | PDF shading module Graphics.PDF.Shading -- | A shading data PDFShading FunctionalShading :: Matrix -> ColorFunction2 -> PDFShading AxialShading :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> ColorFunction1 -> PDFShading RadialShading :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> ColorFunction1 -> PDFShading paintWithShading :: PDFShading -> Draw a -> Draw () -- | Fill clipping region with a shading applyShading :: PDFShading -> Draw () createFunction1Object :: (ColorTuple a, Result e) => Function1 Global a e -> PDF (FunctionObject (PDFFloat -> a) (ExprFloat -> e)) createFunction2Object :: (ColorTuple a, Result e) => Function2 Global a e -> PDF (FunctionObject (PDFFloat -> PDFFloat -> a) (ExprFloat -> ExprFloat -> e)) -- | 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) -- | Create a PDF XObject createPDFXFormExtra :: Rectangle -> Draw a -> PDFDictionary -> 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 :: Text -> Text -> PDFDocumentPageMode -> PDFDocumentPageLayout -> PDFViewerPreferences -> Bool -> PDFDocumentInfo [author] :: PDFDocumentInfo -> Text [subject] :: PDFDocumentInfo -> Text [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 Text module Graphics.PDF.Text data PDFFont PDFFont :: AnyFont -> 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 -> Text -> PDFText () -- | Start a new line (leading value must have been set) startNewLine :: PDFText () -- | Display glyphs displayGlyphs :: PDFGlyph -> PDFText () -- | Display text displayText :: Text -> 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 -> Text -> PDFFloat pdfGlyph :: PDFFont -> Text -> PDFGlyph glyph :: GlyphCode -> PDFGlyph instance Control.Monad.State.Class.MonadState Graphics.PDF.Text.TextParameter Graphics.PDF.Text.PDFText instance Control.Monad.Writer.Class.MonadWriter Data.ByteString.Builder.Internal.Builder Graphics.PDF.Text.PDFText instance GHC.Base.Functor Graphics.PDF.Text.PDFText instance GHC.Base.Applicative Graphics.PDF.Text.PDFText instance GHC.Base.Monad Graphics.PDF.Text.PDFText instance GHC.Enum.Enum Graphics.PDF.Text.TextMode instance GHC.Classes.Ord Graphics.PDF.Text.TextMode instance GHC.Classes.Eq Graphics.PDF.Text.TextMode instance Graphics.PDF.LowLevel.Types.MonadPath Graphics.PDF.Text.PDFText -- | PDF transparency module Graphics.PDF.Transparency data SoftMask createSoftMask :: Rectangle -> Draw a -> PDF SoftMask createTransparencyGroup :: ColorSpace a e -> Rectangle -> Draw b -> PDF (PDFReference PDFXForm) -- | If the Draw Monad paints overlapping geometric primitives or text, the -- result will certainly not be what you want. Text ignores soft masks. -- Each primitive other than text is painted with the soft mask over the -- previous geometric objects. It is very likely, that in this case you -- want to generate a transparency group for your drawing. paintWithTransparency :: SoftMask -> Draw a -> Draw () -- | PDF Font module Graphics.PDF.Typesetting.WritingSystem data WritingSystem Latin :: Hyphenator -> WritingSystem UnknownWritingSystem :: WritingSystem mapToSpecialGlyphs :: WritingSystem -> Text -> [SpecialChar] -- | 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 -- | Box width boxWidth :: Box a => a -> PDFFloat -- | Box height boxHeight :: Box a => a -> PDFFloat -- | Distance between box bottom and box baseline boxDescent :: Box a => a -> PDFFloat -- | Distance between box top and box baseline boxAscent :: Box a => a -> PDFFloat -- | A box that can be displayed class DisplayableBox a -- | Draw a box 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 glyph AGlyph :: !s -> !GlyphCode -> !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 -- | Modify the look of a sentence (sequence of words using the same style -- on a line) sentenceStyle :: Style a => a -> Maybe (Rectangle -> Draw b -> Draw ()) wordStyle :: Style a => a -> Maybe (Rectangle -> StyleFunction -> Draw b -> Draw ()) textStyle :: Style a => a -> TextStyle -- | A style may contain data changed from word to word updateStyle :: Style a => a -> a -- | A style may change the height of words -- --
-- Default implementation -- styleHeight = getHeight . textFont . textStyle --styleHeight :: Style a => a -> PDFFloat -- | A style may change the descent of lines -- --
-- Default implementation -- styleDescent = getDescent . textFont . textStyle --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 -- | Width of the line of the paragraph lineWidth :: ParagraphStyle a s => a -> PDFFloat -> Int -> PDFFloat -- | Horizontal shift of the line position relatively to the left egde of -- the paragraph bounding box linePosition :: ParagraphStyle a s => a -> PDFFloat -> Int -> PDFFloat -- | How to style the interline glues added in a paragraph by the line -- breaking algorithm interline :: ParagraphStyle a s => a -> Maybe (Rectangle -> Draw ()) -- | Change the content of a paragraph before the line breaking algorithm -- is run. It may also change the style paragraphChange :: ParagraphStyle a s => a -> Int -> [Letter s] -> (a, [Letter s]) -- | Get the paragraph bounding box and the paragraph draw command to apply -- additional effects 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 -- | Set the current text style setStyle :: MonadStyle s m => s -> m () -- | Get the current text style currentStyle :: MonadStyle s m => m s -- | Add a box using the current mode (horizontal or vertical. The current -- style is always applied to the added box) addBox :: (MonadStyle s m, Show a, DisplayableBox a, Box a) => a -> PDFFloat -> PDFFloat -> PDFFloat -> m () -- | Add a glue using the current style glue :: MonadStyle s m => PDFFloat -> PDFFloat -> PDFFloat -> m () -- | Add a glue with no style (it is just a translation) 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 styleFont :: Style s => s -> AnyFont -- | Add a null char nullChar :: Para () nullChar = Para . tell $ -- [nullLetter] -- -- Add a text line txt :: Style s => Text -> 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 () -- | Get the current writing system for the paragraph getWritingSystem :: TM ps s WritingSystem setWritingSystem :: WritingSystem -> 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 GHC.Base.Functor (Graphics.PDF.Typesetting.TM ps s) instance Control.Monad.State.Class.MonadState (Graphics.PDF.Typesetting.TMState ps s) (Graphics.PDF.Typesetting.TM ps s) instance Control.Monad.Writer.Class.MonadWriter [Graphics.PDF.Typesetting.Layout.VBox ps s] (Graphics.PDF.Typesetting.TM ps s) instance GHC.Base.Applicative (Graphics.PDF.Typesetting.TM ps s) instance GHC.Base.Monad (Graphics.PDF.Typesetting.TM ps s) instance GHC.Base.Functor (Graphics.PDF.Typesetting.Para s) instance Control.Monad.State.Class.MonadState s (Graphics.PDF.Typesetting.Para s) instance Control.Monad.Reader.Class.MonadReader Graphics.PDF.Typesetting.Breaking.BRState (Graphics.PDF.Typesetting.Para s) instance Control.Monad.Writer.Class.MonadWriter [Graphics.PDF.Typesetting.Breaking.Letter s] (Graphics.PDF.Typesetting.Para s) instance GHC.Base.Applicative (Graphics.PDF.Typesetting.Para s) instance GHC.Base.Monad (Graphics.PDF.Typesetting.Para s) instance GHC.Show.Show Graphics.PDF.Typesetting.Orientation instance GHC.Classes.Eq Graphics.PDF.Typesetting.Orientation instance Graphics.PDF.Typesetting.Box.Style s => Graphics.PDF.Typesetting.MonadStyle s (Graphics.PDF.Typesetting.TM ps s) instance Graphics.PDF.Typesetting.Box.Style s => Graphics.PDF.Typesetting.MonadStyle s (Graphics.PDF.Typesetting.Para s) -- | Generation of PDF documents A PDF library with support for several -- pages, page transitions, outlines, annotations, compression, colors, -- shapes, patterns, jpegs, fonts, typesetting ... Have a look at the -- Graphics.PDF.Documentation module to see how to use it. Or, -- download the package and look at the test.hs file in the Test folder. -- That file is giving an example of each feature. module Graphics.PDF -- | The PDF Monad data PDF a -- | Generates a PDF document runPdf :: String -> PDFDocumentInfo -> PDFRect -> PDF a -> IO () -- | Generate a lazy bytestring for the PDF pdfByteString :: PDFDocumentInfo -> PDFRect -> PDF a -> ByteString -- | A PDF rectangle data PDFRect PDFRect :: !Double -> !Double -> !Double -> !Double -> 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 (serialied as UTF16BE) data PDFString -- | A PDF Page object data PDFPage -- | List of all pages data Pages -- | The drawing monad data Draw a data 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 :: Text -> Text -> PDFDocumentPageMode -> PDFDocumentPageLayout -> PDFViewerPreferences -> Bool -> PDFDocumentInfo [author] :: PDFDocumentInfo -> Text [subject] :: PDFDocumentInfo -> Text [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 -- | 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) -- | 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) -- | No information for the document standardDocInfo :: PDFDocumentInfo standardViewerPrefs :: PDFViewerPreferences -- | 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 () -- | Apply a transformation matrix to the current coordinate frame applyMatrix :: Matrix -> Draw () data ColorSpace a e [GraySpace] :: ColorSpace PDFFloat ExprFloat [RGBSpace] :: ColorSpace FloatRGB ExprRGB [CMYKSpace] :: ColorSpace FloatCMYK ExprCMYK calculator1 :: (ExprFloat -> e) -> Function1 Global a e calculator2 :: (ExprFloat -> ExprFloat -> e) -> Function2 Global a e data ColorFunction1 ColorFunction1 :: ColorSpace a e -> Function1 Local a e -> ColorFunction1 data ColorFunction2 ColorFunction2 :: ColorSpace a e -> Function2 Local a e -> ColorFunction2 data Function1 scope a e [GlobalFunction1] :: FunctionObject (PDFFloat -> a) (ExprFloat -> e) -> Function1 Local a e [Sampled1] :: Array Int a -> Function1 Global a e [Interpolated1] :: PDFFloat -> a -> a -> Function1 scope a e [Stitched1] :: Function1 Local a e -> [(PDFFloat, Function1 Local a e)] -> Function1 scope a e [Calculator1] :: (ExprFloat -> e) -> Function1 Global a e data Function2 scope a e [GlobalFunction2] :: FunctionObject (PDFFloat -> PDFFloat -> a) (ExprFloat -> ExprFloat -> e) -> Function2 Local a e [Sampled2] :: Array (Int, Int) a -> Function2 Global a e [Calculator2] :: (ExprFloat -> ExprFloat -> e) -> Function2 Global a e data Global data Local linearStitched :: ColorTuple a => a -> [(PDFFloat, a)] -> a -> Function1 Local a e data FunctionObject a e -- | Create a type 1 font readType1Font :: FilePath -> FilePath -> IO (Either ParseError Type1FontStructure) mkType1Font :: Type1FontStructure -> PDF AnyFont instance Graphics.PDF.LowLevel.Types.PdfObject Graphics.PDF.PDFTrailer instance Graphics.PDF.LowLevel.Types.PdfLengthInfo Graphics.PDF.PDFTrailer