pub struct TrailerInfo {
pub root: ObjectId,
pub info: Option<ObjectId>,
pub encrypt: Option<ObjectId>,
pub id: Option<[Vec<u8>; 2]>,
pub size: u32,
pub prev: Option<u64>,
}Expand description
Extracted information from the trailer dictionary.
Fields§
§root: ObjectIdThe indirect reference to the document catalog (/Root).
info: Option<ObjectId>Optional indirect reference to the document information dictionary (/Info).
encrypt: Option<ObjectId>Optional indirect reference to the encryption dictionary (/Encrypt).
id: Option<[Vec<u8>; 2]>Optional file identifier array (/ID).
size: u32Total number of cross-reference entries (/Size).
prev: Option<u64>Optional offset to the previous cross-reference section (/Prev).
Implementations§
Source§impl TrailerInfo
impl TrailerInfo
Sourcepub fn root_obj_num(&self) -> u32
pub fn root_obj_num(&self) -> u32
Returns the object number of the document catalog (/Root).
Corresponds to CPDF_Parser::GetRootObjNum() in PDFium.
Sourcepub fn get_root_obj_num(&self) -> u32
pub fn get_root_obj_num(&self) -> u32
ADR-019 alias for root_obj_num().
Corresponds to CPDF_Parser::GetRootObjNum() in PDFium.
Sourcepub fn info_obj_num(&self) -> Option<u32>
pub fn info_obj_num(&self) -> Option<u32>
Returns the object number of the document information dictionary
(/Info), or None if not present.
Corresponds to CPDF_Parser::GetInfoObjNum() in PDFium.
Sourcepub fn get_info_obj_num(&self) -> Option<u32>
pub fn get_info_obj_num(&self) -> Option<u32>
ADR-019 alias for info_obj_num().
Corresponds to CPDF_Parser::GetInfoObjNum() in PDFium.
Sourcepub fn encrypt_dict(&self) -> Option<ObjectId>
pub fn encrypt_dict(&self) -> Option<ObjectId>
Returns the object ID reference to the encryption dictionary
(/Encrypt), or None if the document is not encrypted.
Corresponds to CPDF_Parser::GetEncryptDict() in PDFium (returns the
reference rather than resolving the dictionary itself).
Sourcepub fn get_encrypt_dict(&self) -> Option<ObjectId>
pub fn get_encrypt_dict(&self) -> Option<ObjectId>
ADR-019 alias for encrypt_dict().
Corresponds to CPDF_Parser::GetEncryptDict() in PDFium.
Sourcepub fn get_encrypt_id(&self) -> Option<ObjectId>
👎Deprecated: use get_encrypt_dict() — matches upstream CPDF_Parser::GetEncryptDict()
pub fn get_encrypt_id(&self) -> Option<ObjectId>
use get_encrypt_dict() — matches upstream CPDF_Parser::GetEncryptDict()
Deprecated non-upstream alias for encrypt_dict().
There is no CPDF_Trailer::GetEncryptId() in PDFium upstream; the
correct upstream method is CPDF_Parser::GetEncryptDict(), already
covered by get_encrypt_dict().
Use get_encrypt_dict() instead.
Sourcepub fn encrypt_id(&self) -> Option<ObjectId>
👎Deprecated since 0.0.0: use encrypt_dict() or get_encrypt_dict()
pub fn encrypt_id(&self) -> Option<ObjectId>
use encrypt_dict() or get_encrypt_dict()
Rust-idiomatic alias for encrypt_dict().
Sourcepub fn id_array(&self) -> Option<&[Vec<u8>; 2]>
pub fn id_array(&self) -> Option<&[Vec<u8>; 2]>
Returns a reference to the file identifier byte-string pair (/ID),
or None if not present.
Corresponds to CPDF_Parser::GetIDArray() in PDFium.
Sourcepub fn get_id_array(&self) -> Option<&[Vec<u8>; 2]>
pub fn get_id_array(&self) -> Option<&[Vec<u8>; 2]>
ADR-019 alias for id_array().
Corresponds to CPDF_Parser::GetIDArray() in PDFium.
Trait Implementations§
Source§impl Clone for TrailerInfo
impl Clone for TrailerInfo
Source§fn clone(&self) -> TrailerInfo
fn clone(&self) -> TrailerInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more