gi-poppler-0.18.11: Poppler bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Poppler.Objects.Document

Contents

Description

 

Synopsis

Exported types

newtype Document Source #

Constructors

Document (ManagedPtr Document) 

Instances

GObject Document Source # 
IsObject Document Source # 
IsDocument Document Source # 
((~) * info (ResolveDocumentMethod t Document), MethodInfo * info Document p) => IsLabel t (Document -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Document -> p #

((~) * info (ResolveDocumentMethod t Document), MethodInfo * info Document p) => IsLabelProxy t (Document -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Document -> p #

HasAttributeList * Document Source # 
type AttributeList Document Source # 
type SignalList Document Source # 

Methods

findDest

data DocumentFindDestMethodInfo Source #

Instances

((~) * signature (Text -> m Dest), MonadIO m, IsDocument a) => MethodInfo * DocumentFindDestMethodInfo a signature Source # 

documentFindDest Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> Text

linkName: a named destination

-> m Dest

Returns: The Dest destination or Nothing if linkName is not a destination. Returned value must be freed with poppler_dest_free

Finds named destination linkName in document

getAttachments

documentGetAttachments Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m [Attachment]

Returns: a list of available attachments.

Returns a List containing Attachment<!-- -->s. These attachments are unowned, and must be unreffed, and the list must be freed with g_list_free().

getAuthor

documentGetAuthor Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Text

Returns: a new allocated string containing the author of document, or Nothing

Returns the author of the document

Since: 0.16

getCreationDate

documentGetCreationDate Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m CLong

Returns: the date the document was created, or -1

Returns the date the document was created as seconds since the Epoch

Since: 0.16

getCreator

documentGetCreator Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Text

Returns: a new allocated string containing the creator of document, or Nothing

Returns the creator of the document. If the document was converted from another format, the creator is the name of the product that created the original document from which it was converted.

Since: 0.16

getFormField

documentGetFormField Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: a Document

-> Int32

id: an id of a FormField

-> m FormField

Returns: a new FormField or Nothing if not found

Returns the FormField for the given id. It must be freed with objectUnref

getId

data DocumentGetIdMethodInfo Source #

Instances

((~) * signature (m (Bool, Text, Text)), MonadIO m, IsDocument a) => MethodInfo * DocumentGetIdMethodInfo a signature Source # 

documentGetId Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m (Bool, Text, Text)

Returns: True if the document contains an id, False otherwise

Returns the PDF file identifier represented as two byte string arrays of size 32. permanentId is the permanent identifier that is built based on the file contents at the time it was originally created, so that this identifer never changes. updateId is the update identifier that is built based on the file contents at the time it was last updated.

Note that returned strings are not null-terminated, they have a fixed size of 32 bytes.

Since: 0.16

getKeywords

documentGetKeywords Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Text

Returns: a new allocated string containing keywords associated to document, or Nothing

Returns the keywords associated to the document

Since: 0.16

getMetadata

documentGetMetadata Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Text

Returns: a new allocated string containing the XML metadata, or Nothing

Returns the XML metadata string of the document

Since: 0.16

getModificationDate

documentGetModificationDate Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m CLong

Returns: the date the document was most recently modified, or -1

Returns the date the document was most recently modified as seconds since the Epoch

Since: 0.16

getNAttachments

documentGetNAttachments Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Word32

Returns: Number of attachments

Returns the number of attachments in a loaded document. See also documentGetAttachments

Since: 0.18

getNPages

documentGetNPages Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Int32

Returns: Number of pages

Returns the number of pages in a loaded document.

getPage

data DocumentGetPageMethodInfo Source #

Instances

((~) * signature (Int32 -> m Page), MonadIO m, IsDocument a) => MethodInfo * DocumentGetPageMethodInfo a signature Source # 

documentGetPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> Int32

index: a page index

-> m Page

Returns: The Page at index

Returns the Page indexed at index. This object is owned by the caller.

getPageByLabel

documentGetPageByLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> Text

label: a page label

-> m 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.

getPageLayout

documentGetPageLayout Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m PageLayout

Returns: a PageLayout that should be used when the document is opened

Returns the page layout that should be used when the document is opened

Since: 0.16

getPageMode

documentGetPageMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m PageMode

Returns: a PageMode that should be used when document is opened

Returns a PageMode representing how the document should be initially displayed when opened.

Since: 0.16

getPdfVersion

documentGetPdfVersion Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m (Word32, Word32) 

No description available in the introspection data.

Since: 0.16

getPdfVersionString

documentGetPdfVersionString Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Text

Returns: a new allocated string containing the PDF version of document, or Nothing

Returns the PDF version of document as a string (e.g. PDF-1.6)

Since: 0.16

getPermissions

documentGetPermissions Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m [Permissions]

Returns: a set of falgs from Permissions enumeration

Returns the flags specifying which operations are permitted when the document is opened.

Since: 0.16

getProducer

documentGetProducer Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Text

Returns: a new allocated string containing the producer of document, or Nothing

Returns the producer of the document. If the document was converted from another format, the producer is the name of the product that converted it to PDF

Since: 0.16

getSubject

documentGetSubject Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Text

Returns: a new allocated string containing the subject of document, or Nothing

Returns the subject of the document

Since: 0.16

getTitle

documentGetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Text

Returns: a new allocated string containing the title of document, or Nothing

Returns the document's title

Since: 0.16

hasAttachments

documentHasAttachments Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Bool

Returns: True, if document has attachments.

Returns True of document has any attachments.

isLinearized

documentIsLinearized Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: A Document

-> m Bool

Returns: True if document is linearized, False otherwhise

Returns whether document is linearized or not. Linearization of PDF enables efficient incremental access of the PDF file in a network environment.

Since: 0.16

newFromData

documentNewFromData Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

data: the pdf data contained in a char array

-> Int32

length: the length of data

-> Maybe Text

password: password to unlock the file with, or Nothing

-> m Document

Returns: A newly created Document, or Nothing (Can throw GError)

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

newFromFile

documentNewFromFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

uri: uri of the file to load

-> Maybe Text

password: password to unlock the file with, or Nothing

-> m Document

Returns: A newly created Document, or Nothing (Can throw GError)

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

newFromGfile

documentNewFromGfile Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) 
=> a

file: a File to load

-> Maybe Text

password: password to unlock the file with, or Nothing

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m Document

Returns: a new Document, or Nothing (Can throw GError)

Creates a new Document reading the PDF contents from file. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains.

Since: 0.22

newFromStream

documentNewFromStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) 
=> a

stream: a InputStream to read from

-> Int64

length: the stream length, or -1 if not known

-> Maybe Text

password: password to unlock the file with, or Nothing

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m Document

Returns: a new Document, or Nothing (Can throw GError)

Creates a new Document reading the PDF contents from stream. Note that the given InputStream must be seekable or IOErrorEnumNotSupported will be returned. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains.

Since: 0.22

save

data DocumentSaveMethodInfo Source #

Instances

((~) * signature (Text -> m ()), MonadIO m, IsDocument a) => MethodInfo * DocumentSaveMethodInfo a signature Source # 

documentSave Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: a Document

-> Text

uri: uri of file to save

-> m ()

(Can throw GError)

Saves document. Any change made in the document such as form fields filled, annotations added or modified will be saved. If error is set, False will be returned. Possible errors include those in the G_FILE_ERROR domain.

saveACopy

data DocumentSaveACopyMethodInfo Source #

Instances

((~) * signature (Text -> m ()), MonadIO m, IsDocument a) => MethodInfo * DocumentSaveACopyMethodInfo a signature Source # 

documentSaveACopy Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

document: a Document

-> Text

uri: uri of file to save

-> m ()

(Can throw GError)

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

Properties

author

data DocumentAuthorPropertyInfo Source #

Instances

AttrInfo DocumentAuthorPropertyInfo Source # 
type AttrOrigin DocumentAuthorPropertyInfo Source # 
type AttrLabel DocumentAuthorPropertyInfo Source # 
type AttrGetType DocumentAuthorPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentAuthorPropertyInfo Source # 
type AttrSetTypeConstraint DocumentAuthorPropertyInfo Source # 
type AttrAllowedOps DocumentAuthorPropertyInfo Source # 

creationDate

data DocumentCreationDatePropertyInfo Source #

Instances

AttrInfo DocumentCreationDatePropertyInfo Source # 
type AttrOrigin DocumentCreationDatePropertyInfo Source # 
type AttrLabel DocumentCreationDatePropertyInfo Source # 
type AttrGetType DocumentCreationDatePropertyInfo Source # 
type AttrBaseTypeConstraint DocumentCreationDatePropertyInfo Source # 
type AttrSetTypeConstraint DocumentCreationDatePropertyInfo Source # 
type AttrAllowedOps DocumentCreationDatePropertyInfo Source # 

creator

data DocumentCreatorPropertyInfo Source #

Instances

AttrInfo DocumentCreatorPropertyInfo Source # 
type AttrOrigin DocumentCreatorPropertyInfo Source # 
type AttrLabel DocumentCreatorPropertyInfo Source # 
type AttrGetType DocumentCreatorPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentCreatorPropertyInfo Source # 
type AttrSetTypeConstraint DocumentCreatorPropertyInfo Source # 
type AttrAllowedOps DocumentCreatorPropertyInfo Source # 

format

data DocumentFormatPropertyInfo Source #

Instances

AttrInfo DocumentFormatPropertyInfo Source # 
type AttrOrigin DocumentFormatPropertyInfo Source # 
type AttrLabel DocumentFormatPropertyInfo Source # 
type AttrGetType DocumentFormatPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentFormatPropertyInfo Source # 
type AttrSetTypeConstraint DocumentFormatPropertyInfo Source # 
type AttrAllowedOps DocumentFormatPropertyInfo Source # 

formatMajor

data DocumentFormatMajorPropertyInfo Source #

Instances

AttrInfo DocumentFormatMajorPropertyInfo Source # 
type AttrOrigin DocumentFormatMajorPropertyInfo Source # 
type AttrLabel DocumentFormatMajorPropertyInfo Source # 
type AttrGetType DocumentFormatMajorPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentFormatMajorPropertyInfo Source # 
type AttrSetTypeConstraint DocumentFormatMajorPropertyInfo Source # 
type AttrAllowedOps DocumentFormatMajorPropertyInfo Source # 

formatMinor

data DocumentFormatMinorPropertyInfo Source #

Instances

AttrInfo DocumentFormatMinorPropertyInfo Source # 
type AttrOrigin DocumentFormatMinorPropertyInfo Source # 
type AttrLabel DocumentFormatMinorPropertyInfo Source # 
type AttrGetType DocumentFormatMinorPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentFormatMinorPropertyInfo Source # 
type AttrSetTypeConstraint DocumentFormatMinorPropertyInfo Source # 
type AttrAllowedOps DocumentFormatMinorPropertyInfo Source # 

keywords

data DocumentKeywordsPropertyInfo Source #

Instances

AttrInfo DocumentKeywordsPropertyInfo Source # 
type AttrOrigin DocumentKeywordsPropertyInfo Source # 
type AttrLabel DocumentKeywordsPropertyInfo Source # 
type AttrGetType DocumentKeywordsPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentKeywordsPropertyInfo Source # 
type AttrSetTypeConstraint DocumentKeywordsPropertyInfo Source # 
type AttrAllowedOps DocumentKeywordsPropertyInfo Source # 

linearized

data DocumentLinearizedPropertyInfo Source #

Instances

AttrInfo DocumentLinearizedPropertyInfo Source # 
type AttrOrigin DocumentLinearizedPropertyInfo Source # 
type AttrLabel DocumentLinearizedPropertyInfo Source # 
type AttrGetType DocumentLinearizedPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentLinearizedPropertyInfo Source # 
type AttrSetTypeConstraint DocumentLinearizedPropertyInfo Source # 
type AttrAllowedOps DocumentLinearizedPropertyInfo Source # 

metadata

data DocumentMetadataPropertyInfo Source #

Instances

AttrInfo DocumentMetadataPropertyInfo Source # 
type AttrOrigin DocumentMetadataPropertyInfo Source # 
type AttrLabel DocumentMetadataPropertyInfo Source # 
type AttrGetType DocumentMetadataPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentMetadataPropertyInfo Source # 
type AttrSetTypeConstraint DocumentMetadataPropertyInfo Source # 
type AttrAllowedOps DocumentMetadataPropertyInfo Source # 

modDate

data DocumentModDatePropertyInfo Source #

Instances

AttrInfo DocumentModDatePropertyInfo Source # 
type AttrOrigin DocumentModDatePropertyInfo Source # 
type AttrLabel DocumentModDatePropertyInfo Source # 
type AttrGetType DocumentModDatePropertyInfo Source # 
type AttrBaseTypeConstraint DocumentModDatePropertyInfo Source # 
type AttrSetTypeConstraint DocumentModDatePropertyInfo Source # 
type AttrAllowedOps DocumentModDatePropertyInfo Source # 

pageLayout

data DocumentPageLayoutPropertyInfo Source #

Instances

AttrInfo DocumentPageLayoutPropertyInfo Source # 
type AttrOrigin DocumentPageLayoutPropertyInfo Source # 
type AttrLabel DocumentPageLayoutPropertyInfo Source # 
type AttrGetType DocumentPageLayoutPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentPageLayoutPropertyInfo Source # 
type AttrSetTypeConstraint DocumentPageLayoutPropertyInfo Source # 
type AttrAllowedOps DocumentPageLayoutPropertyInfo Source # 

pageMode

data DocumentPageModePropertyInfo Source #

Instances

AttrInfo DocumentPageModePropertyInfo Source # 
type AttrOrigin DocumentPageModePropertyInfo Source # 
type AttrLabel DocumentPageModePropertyInfo Source # 
type AttrGetType DocumentPageModePropertyInfo Source # 
type AttrBaseTypeConstraint DocumentPageModePropertyInfo Source # 
type AttrSetTypeConstraint DocumentPageModePropertyInfo Source # 
type AttrAllowedOps DocumentPageModePropertyInfo Source # 

permissions

data DocumentPermissionsPropertyInfo Source #

Instances

AttrInfo DocumentPermissionsPropertyInfo Source # 
type AttrOrigin DocumentPermissionsPropertyInfo Source # 
type AttrLabel DocumentPermissionsPropertyInfo Source # 
type AttrGetType DocumentPermissionsPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentPermissionsPropertyInfo Source # 
type AttrSetTypeConstraint DocumentPermissionsPropertyInfo Source # 
type AttrAllowedOps DocumentPermissionsPropertyInfo Source # 

producer

data DocumentProducerPropertyInfo Source #

Instances

AttrInfo DocumentProducerPropertyInfo Source # 
type AttrOrigin DocumentProducerPropertyInfo Source # 
type AttrLabel DocumentProducerPropertyInfo Source # 
type AttrGetType DocumentProducerPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentProducerPropertyInfo Source # 
type AttrSetTypeConstraint DocumentProducerPropertyInfo Source # 
type AttrAllowedOps DocumentProducerPropertyInfo Source # 

subject

data DocumentSubjectPropertyInfo Source #

Instances

AttrInfo DocumentSubjectPropertyInfo Source # 
type AttrOrigin DocumentSubjectPropertyInfo Source # 
type AttrLabel DocumentSubjectPropertyInfo Source # 
type AttrGetType DocumentSubjectPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentSubjectPropertyInfo Source # 
type AttrSetTypeConstraint DocumentSubjectPropertyInfo Source # 
type AttrAllowedOps DocumentSubjectPropertyInfo Source # 

title

data DocumentTitlePropertyInfo Source #

Instances

AttrInfo DocumentTitlePropertyInfo Source # 
type AttrOrigin DocumentTitlePropertyInfo Source # 
type AttrLabel DocumentTitlePropertyInfo Source # 
type AttrGetType DocumentTitlePropertyInfo Source # 
type AttrBaseTypeConstraint DocumentTitlePropertyInfo Source # 
type AttrSetTypeConstraint DocumentTitlePropertyInfo Source # 
type AttrAllowedOps DocumentTitlePropertyInfo Source # 

viewerPreferences

data DocumentViewerPreferencesPropertyInfo Source #

Instances

AttrInfo DocumentViewerPreferencesPropertyInfo Source # 
type AttrOrigin DocumentViewerPreferencesPropertyInfo Source # 
type AttrLabel DocumentViewerPreferencesPropertyInfo Source # 
type AttrGetType DocumentViewerPreferencesPropertyInfo Source # 
type AttrBaseTypeConstraint DocumentViewerPreferencesPropertyInfo Source # 
type AttrSetTypeConstraint DocumentViewerPreferencesPropertyInfo Source # 
type AttrAllowedOps DocumentViewerPreferencesPropertyInfo Source #