poppler-0.12.3: Binding to the Poppler.

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

Graphics.UI.Gtk.Poppler.Page

Contents

Description

 

Synopsis

Types

data Cairo

data PopplerRectangle Source

Rectangles describing an area in Doubles.

  • Specifies x, y, width and height

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.

pageGetIndexSource

Arguments

:: PageClass page 
=> page 
-> IO Int

returns index value of page

Returns the index of page

pageGetThumbnailSource

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

pageFindTextSource

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.

pageGetTextSource

Arguments

:: PageClass page 
=> page 
-> IO String

returns selection string

Retrieves the contents of the specified selection as text.

pageGetDurationSource

Arguments

:: PageClass page 
=> page 
-> IO Double

returns duration in seconds of page or -1.

Returns the duration of page

pageGetTransitionSource

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.

pageGetSelectionRegionSource

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.

pageRenderSelectionSource

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.