-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generate Code 128 barcodes as PDFs -- @package barcodes-code128 @version 0.1.0 -- | A library for generating barcodes in Code 128. Details of the encoding -- are available at http://en.wikipedia.org/wiki/Code_128. The -- width of the stripes and the height of the barcode are configurable. -- Two modes of operation are supported: -- -- module Graphics.Barcode.Code128 -- | Controls the size of the generated barcode. All units are in HPDF's -- internal sizing. data BarcodeConfig BarcodeConfig :: Double -> Double -> BarcodeConfig -- | The height of the generated barcode height :: BarcodeConfig -> Double -- | The width of the narrowest possible bar barWidth :: BarcodeConfig -> Double -- | Errors that can occur while constructing a barcode data Err -- | The returned character cannot be encoded in Code 128 CantEncode :: Char -> Err -- | Determine the width and height of rendering a particular string as a -- barcode in a particular configuration. barcodeSize :: BarcodeConfig -> [Char] -> Either Err (Double, Double) -- | Generate PDF data containing the barcode for a given string, with the -- tightest possible bounding box. If the string cannot be encoded in -- Code 128, an IOError is thrown. barcodePDF :: BarcodeConfig -> String -> IO ByteString -- | Encode a string and construct an action in Draw that will -- render it as a barcode. The action, if created successfully, will -- return the opposite corner of the barcode. An error is returned if the -- string could not be encoded as a Code128 barcode. drawBarcode :: BarcodeConfig -> String -> Point -> Either Err (Draw Point) instance Show Err instance Eq Code128Digit instance Ord Code128Digit instance Show Code128Digit instance Eq Code128Code instance Ord Code128Code instance Show Code128Code instance Eq Code128Interp instance Show Code128Interp instance Show Code128Symbol instance Eq Code128Symbol