poppler-0.13.1: Binding to the Poppler.

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

Graphics.UI.Gtk.Poppler.Document

Contents

Description

 

Synopsis

Details

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

Types

Enums

Methods

documentNewFromFile Source

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.

documentNewFromData Source

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.

documentSave Source

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.

documentGetNPages Source

Arguments

:: DocumentClass doc 
=> doc 
-> IO Int

returns Number of pages

Returns the number of pages in a loaded document.

documentGetPage Source

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.

documentGetPageByLabel Source

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.

documentFindDest Source

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

documentHasAttachments Source

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.

documentGetFormField Source

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 IndexIter Source

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.

indexIterIsOpen Source

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.

indexIterNext Source

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 Action Source

Returns the Action associated with iter.

fontsIterNext Source

Arguments

:: FontsIterClass iter 
=> iter 
-> IO Bool

returns True, if iter was set to the next action

psFileNew Source

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

psFileSetPaperSize Source

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.

psFileSetDuplex Source

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 String Source

The author of the document.

Default value: ""

documentCreationDate :: DocumentClass doc => ReadAttr doc Int Source

The date and time the document was created.

Allowed values: >= 0

Default value: 0

documentCreator :: DocumentClass doc => ReadAttr doc String Source

The software that created the document.

Default value: ""

documentFormat :: DocumentClass doc => ReadAttr doc String Source

The PDF version of the document.

Default value: ""

documentFormatMajor :: DocumentClass doc => ReadAttr doc String Source

The PDF major version number of the document.

Default value: 1

documentFormatMinor :: DocumentClass doc => ReadAttr doc String Source

The PDF minor version number of the document.

Default value: 0

documentKeywords :: DocumentClass doc => ReadAttr doc String Source

Keywords.

Default value: ""

documentLinearized :: DocumentClass doc => ReadAttr doc String Source

Is the document optimized for web viewing?.

Default value: ""

documentMetadata :: DocumentClass doc => ReadAttr doc String Source

Embedded XML metadata.

Default value: ""

documentModDate :: DocumentClass doc => ReadAttr doc Int Source

The date and time the document was modified.

Allowed values: >= 0

Default value: 0

documentPageLayout :: DocumentClass doc => ReadAttr doc PageLayout Source

Initial Page Layout.

Default value: PageLayoutUnset

documentPageMode :: DocumentClass doc => ReadAttr doc PageMode Source

Page Mode.

Default value: PageModeUnset

documentProducer :: DocumentClass doc => ReadAttr doc String Source

The software that converted the document.

Default value: ""

documentSubject :: DocumentClass doc => ReadAttr doc String Source

Subjects the document touches.

Default value: ""

documentTitle :: DocumentClass doc => ReadAttr doc String Source

The title of the document.

Default value: ""

documentLabel :: DocumentClass doc => ReadAttr doc String Source

The label of the page.

Default value: ""