poppler-0.14.1: Binding to the Poppler.

Maintainergtk2hs-devel@lists.sourceforge.net
Stabilityalpha
Portabilityportable (depends on GHC)
Safe HaskellNone
LanguageHaskell2010

Graphics.UI.Gtk.Poppler.Page

Contents

Description

 

Synopsis

Types

data Cairo :: * #

Instances

MonadReader Cairo Render 

Methods

ask :: Render Cairo #

local :: (Cairo -> Cairo) -> Render a -> Render a #

reader :: (Cairo -> a) -> Render a #

Enums

Methods

pageRender :: PageClass page => page -> Render () Source #

Render the page to the given cairo context. This function is for rendering a page that will be displayed. If you want to render a page that will be printed use pageRenderForPrinting instead

pageGetSize :: PageClass page => page -> IO (Double, Double) Source #

First scale the document to match the specified pixels per point, then render the rectangle given by the upper left corner at (srcX, srcY) and srcWidth and srcHeight. This function is for rendering a page that will be displayed. If you want to render a page that will be printed use pageRenderToPixbufForPrinting instead

Gets the size of page at the current scale and rotation.

pageGetIndex Source #

Arguments

:: PageClass page 
=> page 
-> IO Int

returns index value of page

Returns the index of page

pageGetThumbnail Source #

Arguments

:: PageClass page 
=> page 
-> IO (Maybe Surface)

returns the tumbnail as a cairoSurfaceT or Nothing if the document doesn't have a thumbnail for this page.

Get the embedded thumbnail for the specified page. If the document doesn't have an embedded thumbnail for the page, this function returns Nothing.

pageGetThumbnailSize :: PageClass page => page -> IO (Maybe (Int, Int)) Source #

Returns True if page has a thumbnail associated with it. It also fills in width and height with the width and height of the thumbnail. The values of width and height are not changed if no appropriate thumbnail exists.

pageRenderToPs :: (PageClass page, PSFileClass psFile) => page -> psFile -> IO () Source #

Render the page on a postscript file

pageFindText Source #

Arguments

:: PageClass page 
=> page 
-> String

text the text to search for (UTF-8 encoded)

-> IO [PopplerRectangle] 

A GList of rectangles for each occurance of the text on the page. The coordinates are in PDF points.

pageGetText Source #

Arguments

:: PageClass page 
=> page 
-> IO String

returns selection string

Retrieves the contents of the specified selection as text.

pageGetDuration Source #

Arguments

:: PageClass page 
=> page 
-> IO Double

returns duration in seconds of page or -1.

Returns the duration of page

pageGetTransition Source #

Arguments

:: PageClass page 
=> page 
-> IO (Maybe PageTransition)

returns a PageTransition or Nothing.

Returns the transition effect of page

pageGetLinkMapping :: PageClass page => page -> IO [LinkMapping] Source #

Returns a list of LinkMapping items that map from a location on page to a Action.

pageGetImageMapping :: PageClass page => page -> IO [ImageMapping] Source #

Returns a list of ImageMapping items that map from a location on page to a Action.

pageGetFormFieldMapping :: PageClass page => page -> IO [FormFieldMapping] Source #

Returns a list of FormFieldMapping items that map from a location on page to a Action.

pageGetSelectionRegion Source #

Arguments

:: PageClass page 
=> page 
-> Double

scale scale specified as pixels per point

-> SelectionStyle

style a SelectionStyle

-> PopplerRectangle

selection start and end point of selection as a rectangle

-> IO [PopplerRectangle] 

Returns a region containing the area that would be rendered by pageRenderSelection or pageRenderSelectionToPixbuf as a GList of PopplerRectangle.

pageRenderSelection Source #

Arguments

:: PageClass page 
=> page 
-> PopplerRectangle

selection start and end point of selection as a rectangle

-> PopplerRectangle

oldSelection previous selection

-> SelectionStyle

style a SelectionStyle

-> PopplerColor

glyphColor color to use for drawing glyphs

-> PopplerColor

backgroundColor color to use for the selection background

-> Render () 

Render the selection specified by selection for page to the given cairo context. The selection will be rendered, using glyphColor for the glyphs and backgroundColor for the selection background.

If non-Nothing, oldSelection specifies the selection that is already rendered to cairo, in which case this function will (some day) only render the changed part of the selection.