Class: Poppler::Attachment

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

The GObject class structure of Poppler::Attachment.

Instance Method Summary collapse

Instance Method Details

#checksumGLib::String

Returns The attachment's checksum.

Returns:

  • (GLib::String)

    The attachment's checksum.

#ctimeGLib::DateTime

as a GDate::Time, or nil if the creation date and time is not available.

Returns:

  • (GLib::DateTime)

    The attachment's creation date and time

#descriptionString

Returns The attachment's descriptive text.

Returns:

  • (String)

    The attachment's descriptive text.

#mtimeGLib::DateTime

time as a GDate::Time, or nil if the modification date and time is not available.

Returns:

  • (GLib::DateTime)

    The attachment's modification date and

#nameString

Returns The attachment's name.

Returns:

  • (String)

    The attachment's name.

#save(filename) ⇒ Boolean

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.

Parameters:

  • filename (String)

    name of file to save

Returns:

  • (Boolean)

    true, if the file successfully saved

#save_to_callback(save_func, user_data) ⇒ Boolean

Saves attachment by feeding the produced data to save_func. 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.

Parameters:

  • save_func (Poppler::AttachmentSaveFunc)

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

  • user_data (GObject)

    user data to pass to the save function.

Returns:

  • (Boolean)

    true, if the save successfully completed

#save_to_fd(fd) ⇒ Boolean

Saves attachment to a file referred to by fd. If error is set, false will be returned. Possible errors include those in the #G_FILE_ERROR domain and whatever the save function generates. Note that this function takes ownership of fd; you must not operate on it again, nor close it.

Parameters:

  • fd (Integer)

    a valid file descriptor open for writing

Returns:

  • (Boolean)

    true, if the file successfully saved

#sizeInteger

Returns The attachment's size.

Returns:

  • (Integer)

    The attachment's size.