HPDF-1.4.2: Generation of PDF documents

Portabilityportable
Stabilityexperimental
Maintainermisc@NOSPAMalpheccar.org

Graphics.PDF.Text

Contents

Description

PDF Text

Synopsis

Text

Types

data PDFFont Source

Constructors

PDFFont FontName FontSize 

Instances

Eq PDFFont 
Ord PDFFont 
Show PDFFont 
PdfResourceObject PDFFont 

data PDFText a Source

The text monad

type UnscaledUnit = PDFFloatSource

Unscaled unit (not scaled by the font size)

Functions

drawText :: PDFText a -> Draw aSource

Draw a text in the draw monad

text :: PDFFont -> PDFFloat -> PDFFloat -> PDFString -> PDFText ()Source

Utility function to quickly display one line of text

toPDFString :: String -> PDFStringSource

Create a PDF string from an Haskell one

startNewLine :: PDFText ()Source

Start a new line (leading value must have been set)

displayText :: PDFString -> PDFText ()Source

Display some text

textStart :: PDFFloat -> PDFFloat -> PDFText ()Source

Set position for the text beginning

setFont :: PDFFont -> PDFText ()Source

Select a font to use

leading :: UnscaledUnit -> PDFText ()Source

Set leading value

charSpace :: UnscaledUnit -> PDFText ()Source

Set the additional char space

wordSpace :: UnscaledUnit -> PDFText ()Source

Set the additional word space

textScale :: PDFFloat -> PDFText ()Source

Set scaling factor for text

renderMode :: TextMode -> PDFText ()Source

Choose the text rendering mode

rise :: UnscaledUnit -> PDFText ()Source

Set the rise value

setTextMatrix :: Matrix -> PDFText ()Source

Set the text transformation matrix

ripTextSource

Arguments

:: PDFFont

Font

-> PDFString

String

-> [(PDFFloat, Char)]

List of chars and char width taking into account kerning