pub struct PdfProcessResult {Show 18 fields
pub pdf_type: PdfType,
pub markdown: Option<String>,
pub page_count: u32,
pub processing_time_ms: u64,
pub pages_needing_ocr: Vec<u32>,
pub ocr_reasons_by_page: Vec<PageOcrReasons>,
pub title: Option<String>,
pub author: Option<String>,
pub subject: Option<String>,
pub keywords: Option<String>,
pub creator: Option<String>,
pub producer: Option<String>,
pub creation_date: Option<String>,
pub mod_date: Option<String>,
pub confidence: f32,
pub layout: LayoutComplexity,
pub has_encoding_issues: bool,
pub cmap_gaps: Vec<FontCMapGaps>,
}Expand description
High-level PDF processing result.
Fields§
§pdf_type: PdfTypeThe detected PDF type.
markdown: Option<String>Markdown output (populated in ProcessMode::Full, None otherwise).
page_count: u32Page count.
processing_time_ms: u64Processing time in milliseconds.
pages_needing_ocr: Vec<u32>1-indexed page numbers that need OCR.
ocr_reasons_by_page: Vec<PageOcrReasons>Machine-readable OCR reasons by 1-indexed page.
title: Option<String>The /Title of the document information dictionary, decoded as a
PDF text string (UTF-16 or UTF-8 after a byte order mark,
PDFDocEncoding otherwise; see PdfTypeResult::title). None when
the entry is missing or not a string. The entries below follow the
same decoding and missing-value rule.
The document information dictionary’s /Author.
subject: Option<String>The document information dictionary’s /Subject.
keywords: Option<String>The document information dictionary’s /Keywords.
creator: Option<String>The document information dictionary’s /Creator: the application
the document was authored in.
producer: Option<String>The document information dictionary’s /Producer: the application
that wrote the PDF.
creation_date: Option<String>The document information dictionary’s /CreationDate as written, a
PDF date string such as D:20240115103000+01'00', neither validated
nor converted.
mod_date: Option<String>The document information dictionary’s /ModDate as written, like
creation_date.
confidence: f32Detection confidence score (0.0–1.0).
layout: LayoutComplexityLayout complexity analysis (tables, multi-column detection).
has_encoding_issues: booltrue when broken font encodings are detected (garbled text,
replacement characters). Clients should fall back to OCR.
cmap_gaps: Vec<FontCMapGaps>The fonts whose ToUnicode CMap — or, for a font without one, the
embedded program’s cmap table — lacked an entry for a code the
document shows through it, with the counts of codes shown, read from
their neighbours and left as U+FFFD (see FontCMapGaps). Always
empty in ProcessMode::DetectOnly, which decodes no text;
otherwise empty when every such code had an entry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PdfProcessResult
impl RefUnwindSafe for PdfProcessResult
impl Send for PdfProcessResult
impl Sync for PdfProcessResult
impl Unpin for PdfProcessResult
impl UnsafeUnpin for PdfProcessResult
impl UnwindSafe for PdfProcessResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more