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

Contents

Description

 

Synopsis

Exported types

Methods

save

data AttachmentSaveMethodInfo Source #

Instances

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

attachmentSave Source #

Arguments

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

attachment: A Attachment.

-> Text

filename: name of file to save

-> m ()

(Can throw GError)

Saves attachment to a file indicated by filename. If error is set, False will be returned. Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates.

saveToCallback

attachmentSaveToCallback Source #

Arguments

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

attachment: A Attachment.

-> FunPtr C_AttachmentSaveFunc

saveFunc: a function that is called to save each block of data that the save routine generates.

-> m ()

(Can throw GError)

Saves attachment by feeding the produced data to saveFunc. Can be used when you want to store the attachment to something other than a file, such as an in-memory buffer or a socket. If error is set, False will be returned. Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates.