poppler-0.12.2.2: Binding to the Poppler.

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

Graphics.UI.Gtk.Poppler.Document

Contents

Description

 

Synopsis

Details

The Document is an object used to refer to a main document.

Types

class GObjectClass o => PageClass o Source

Instances

Enums

Methods

documentNewFromFileSource

Arguments

:: String

uri uri of the file to load

-> Maybe String

password password to unlock the file with, or Nothing

-> IO (Maybe Document)

returns A newly created Document, or Nothing

Creates a new Document. If Nothing is returned, then error will be set. Possible errors include those in the Error and GFileError domains.

documentNewFromDataSource

Arguments

:: String

data the pdf data contained in a char array

-> Maybe String

password password to unlock the file with, or Nothing

-> IO (Maybe Document)

returns A newly created Document, or Nothing

Creates a new Document. If Nothing is returned, then error will be set. Possible errors include those in the Error and GFileError domains.

documentSaveSource

Arguments

:: DocumentClass doc 
=> doc 
-> String

uri uri of file to save

-> IO Bool

returns True, if the document was successfully saved

Saves document. Any change made in the document such as form fields filled by the user will be saved. If error is set, False will be returned. Possible errors include those in the GFileError domain.

documentGetNPagesSource

Arguments

:: DocumentClass doc 
=> doc 
-> IO Int

returns Number of pages

Returns the number of pages in a loaded document.

documentGetPageSource

Arguments

:: DocumentClass doc 
=> doc 
-> Int

index a page index

-> IO Page

returns The Page at index

Returns the Page indexed at index. This object is owned by the caller. | Pages are indexed starting at 0.

documentGetPageByLabelSource

Arguments

:: DocumentClass doc 
=> doc 
-> String

label a page label

-> IO Page

returns The Page referenced by label

Returns the Page reference by label. This object is owned by the caller. label is a human-readable string representation of the page number, and can be document specific. Typically, it is a value such as iii or 3.

By default, 1 refers to the first page.

documentFindDestSource

Arguments

:: DocumentClass doc 
=> doc 
-> String

linkName a named destination

-> IO (Maybe Dest)

returns The Dest destination or Nothing if linkName is not a destination.

Finds named destination linkName in document

documentHasAttachmentsSource

Arguments

:: DocumentClass doc 
=> doc 
-> IO Bool

returns True, if document has attachments.

Returns True of document has any attachments.

documentGetAttachments :: DocumentClass doc => doc -> IO [Attachment]Source

Returns a GList containing Attachments.

documentGetFormFieldSource

Arguments

:: DocumentClass doc 
=> doc 
-> Int

id an id of a FormField

-> IO (Maybe FormField) 

Returns the FormField for the given id.

indexIterNew :: DocumentClass doc => doc -> IO (Maybe IndexIter)Source

Returns the root IndexIter for document, or Nothing.

indexIterCopy :: IndexIter -> IO IndexIterSource

Creates a new IndexIter as a copy of iter.

indexIterGetChild :: IndexIter -> IO (Maybe IndexIter)Source

Returns a newly created child of parent, or Nothing if the iter has no child. See indexIterNew for more information on this function.

indexIterIsOpenSource

Arguments

:: IndexIter 
-> IO Bool

returns True, if the document wants iter to be expanded

Returns whether this node should be expanded by default to the user. The document can provide a hint as to how the document's index should be expanded initially.

indexIterNextSource

Arguments

:: IndexIter 
-> IO Bool

returns True, if iter was set to the next action

Sets iter to point to the next action at the current level, if valid. See indexIterNew for more information.

indexIterGetAction :: IndexIter -> IO ActionSource

Returns the Action associated with iter.

fontsIterNextSource

Arguments

:: FontsIterClass iter 
=> iter 
-> IO Bool

returns True, if iter was set to the next action

psFileNewSource

Arguments

:: DocumentClass doc 
=> doc 
-> String

filename the path of the output filename

-> Int

firstPage the first page to print

-> Int

nPages the number of pages to print

-> IO PSFile 

Create a new postscript file to render to

psFileSetPaperSizeSource

Arguments

:: PSFileClass file 
=> file

psFile a PSFile which was not yet printed to.

-> Double

width the paper width in 1/72 inch

-> Double

height the paper height in 1/72 inch

-> IO () 

Set the output paper size. These values will end up in the DocumentMedia, the BoundingBox DSC comments and other places in the generated PostScript.

psFileSetDuplexSource

Arguments

:: PSFileClass file 
=> file

psFile a PSFile which was not yet printed to

-> Bool

duplex whether to force duplex printing (on printers which support this)

-> IO () 

Enable or disable Duplex printing.

Attributes

documentAuthor :: DocumentClass doc => ReadAttr doc StringSource

The author of the document.

Default value: ""

documentCreationDate :: DocumentClass doc => ReadAttr doc IntSource

The date and time the document was created.

Allowed values: >= 0

Default value: 0

documentCreator :: DocumentClass doc => ReadAttr doc StringSource

The software that created the document.

Default value: ""

documentFormat :: DocumentClass doc => ReadAttr doc StringSource

The PDF version of the document.

Default value: ""

documentFormatMajor :: DocumentClass doc => ReadAttr doc StringSource

The PDF major version number of the document.

Default value: 1

documentFormatMinor :: DocumentClass doc => ReadAttr doc StringSource

The PDF minor version number of the document.

Default value: 0

documentKeywords :: DocumentClass doc => ReadAttr doc StringSource

Keywords.

Default value: ""

documentLinearized :: DocumentClass doc => ReadAttr doc StringSource

Is the document optimized for web viewing?.

Default value: ""

documentMetadata :: DocumentClass doc => ReadAttr doc StringSource

Embedded XML metadata.

Default value: ""

documentModDate :: DocumentClass doc => ReadAttr doc IntSource

The date and time the document was modified.

Allowed values: >= 0

Default value: 0

documentPageLayout :: DocumentClass doc => ReadAttr doc PageLayoutSource

Initial Page Layout.

Default value: PageLayoutUnset

documentPageMode :: DocumentClass doc => ReadAttr doc PageModeSource

Page Mode.

Default value: PageModeUnset

documentProducer :: DocumentClass doc => ReadAttr doc StringSource

The software that converted the document.

Default value: ""

documentSubject :: DocumentClass doc => ReadAttr doc StringSource

Subjects the document touches.

Default value: ""

documentTitle :: DocumentClass doc => ReadAttr doc StringSource

The title of the document.

Default value: ""

documentLabel :: DocumentClass doc => ReadAttr doc StringSource

The label of the page.

Default value: ""