get_meta_info
Получает значение метаинформации PDF-документа.
pub fn get_meta_info(&self, key: &str) -> Result<String, PdfError>
Arguments
- key - the key whose value to get
Returns
- Ok(String) - if the operation succeeds
- Err(PdfError) - if the operation fails
Example
use asposepdf::Document;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Откройте PDF‑документ с именем файла
let pdf = Document::open("sample.pdf")?;
// Получить значение метаинформации PDF-документа
let author = pdf.get_meta_info("Author")?;
// Вывести результат
println!("Author: {}", author);
Ok(())
}