Hufflepdf/src/PDF/Text.hs

29 lines
636 B
Haskell
Raw Normal View History

{-# LANGUAGE FlexibleContexts #-}
module PDF.Text (
CMap
, CMappers
, PageContents(..)
, cMap
, pageContents
) where
import Control.Monad.State (MonadState)
import Data.ByteString.Lazy.Char8 (ByteString)
import Data.Map (Map)
import PDF.Object (Dictionary)
import PDF.Output (ObjectId)
import PDF.Parser (Parser)
type CMappers = Map ObjectId CMap
type CMap = Map Int ByteString
cMap :: ByteString -> CMap
cMap = undefined
data PageContents = PageContents {
chunks :: [ByteString]
}
pageContents :: MonadState CMappers m => Dictionary -> ByteString -> m PageContents
pageContents font page = undefined