Poppler.Attachment¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
None
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
checksum  | 
r  | 
A 16-byte checksum of the file. Deprecated in poppler 20.09.0. Use   | 
|
ctime  | 
r  | 
The date and time when the file was created. Deprecated in poppler 20.09.0. Use   | 
|
description  | 
r  | 
Descriptive text. Deprecated in poppler 20.09.0. Use   | 
|
mtime  | 
r  | 
The date and time when the file was last modified. Deprecated in poppler 20.09.0. Use   | 
|
name  | 
r  | 
The filename. Deprecated in poppler 20.09.0. Use   | 
|
parent  | 
r  | 
||
size  | 
r  | 
The size of the file. Deprecated in poppler 20.09.0. Use   | 
Class Details¶
- class Poppler.Attachment(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- get_checksum()¶
 - Returns:
 The attachment’s checksum.
- Return type:
 
New in version 20.09.0.
- get_ctime()¶
 - Returns:
 The attachment’s creation date and time as a
GLib.DateTime, orNoneif the creation date and time is not available.- Return type:
 
New in version 20.09.0.
- get_description()¶
 - Returns:
 The attachment’s descriptive text.
- Return type:
 
New in version 20.09.0.
- get_mtime()¶
 - Returns:
 The attachment’s modification date and time as a
GLib.DateTime, orNoneif the modification date and time is not available.- Return type:
 
New in version 20.09.0.
- save(filename)¶
 - Parameters:
 filename (
str) – name of file to save- Raises:
 - Returns:
 True, if the file successfully saved- Return type:
 
Saves self to a file indicated by filename. If error is set,
Falsewill be returned. Possible errors include those in the #G_FILE_ERROR domain and whatever the save function generates.
- save_to_callback(save_func, *user_data)¶
 - Parameters:
 save_func (
Poppler.AttachmentSaveFunc) – a function that is called to save each block of data that the save routine generates.user_data (
objectorNone) – user data to pass to the save function.
- Raises:
 - Returns:
 True, if the save successfully completed- Return type:
 
Saves self 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,
Falsewill be returned. Possible errors include those in the #G_FILE_ERROR domain and whatever the save function generates.
- save_to_fd(fd)¶
 - Parameters:
 fd (
int) – a valid file descriptor open for writing- Raises:
 - Returns:
 True, if the file successfully saved- Return type:
 
Saves self to a file referred to by fd. If error is set,
Falsewill 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.New in version 21.12.0.