pub struct PdfiumBackend { /* private fields */ }Expand description
PDFium backend implementation.
Implementations§
Source§impl PdfiumBackend
impl PdfiumBackend
Sourcepub fn from_library_path(path: impl Into<PathBuf>) -> Self
pub fn from_library_path(path: impl Into<PathBuf>) -> Self
Construct a backend using an explicit PDFium dynamic library path.
Sourcepub fn with_artifact_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_artifact_path(self, path: impl Into<PathBuf>) -> Self
Add an explicit downloaded PDFium release artifact path for archive-hash verification.
Sourcepub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
Construct a backend using an explicit PDFium path and pinned version string.
Sourcepub fn probe_library(&self) -> Result<BackendManifest, EthosError>
pub fn probe_library(&self) -> Result<BackendManifest, EthosError>
Probe whether the configured PDFium dynamic library can be loaded and initialized.
This does not parse a document. It uses the same library load, symbol resolution, and process-global PDFium init/destroy path as extraction, so callers should run it in a disposable subprocess when probing operator-provided libraries.
Sourcepub fn geometry_probe(
&self,
pdf_bytes: &[u8],
config: &ParseConfig,
) -> Result<GeometryProbeReport, EthosError>
pub fn geometry_probe( &self, pdf_bytes: &[u8], config: &ParseConfig, ) -> Result<GeometryProbeReport, EthosError>
Produce a debug-only geometry-source probe from PDFium text APIs.
The returned data is diagnostic evidence only. It is intentionally
separate from EthosPdfBackend::extract so parser behavior,
canonical JSON, and document fingerprints cannot change by accident.
Sourcepub fn render_crop_raw(
&self,
pdf_bytes: &[u8],
page_index: u32,
bbox: QRect,
) -> Result<RawCrop, EthosError>
pub fn render_crop_raw( &self, pdf_bytes: &[u8], page_index: u32, bbox: QRect, ) -> Result<RawCrop, EthosError>
Render a raw BGRA crop for a 1-based page and quantized top-left bbox.
The current boundary renders the page at 1 pixel per PDF point, then crops the requested bbox. It is intentionally simple; direct crop-window rendering can replace it later without changing the output contract.
Trait Implementations§
Source§impl Clone for PdfiumBackend
impl Clone for PdfiumBackend
Source§fn clone(&self) -> PdfiumBackend
fn clone(&self) -> PdfiumBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PdfiumBackend
impl Debug for PdfiumBackend
Source§impl Default for PdfiumBackend
impl Default for PdfiumBackend
Source§fn default() -> PdfiumBackend
fn default() -> PdfiumBackend
Source§impl EthosPdfBackend for PdfiumBackend
impl EthosPdfBackend for PdfiumBackend
Source§fn manifest(&self) -> BackendManifest
fn manifest(&self) -> BackendManifest
Source§fn page_count(&self, pdf_bytes: &[u8]) -> Result<u32, EthosError>
fn page_count(&self, pdf_bytes: &[u8]) -> Result<u32, EthosError>
Source§fn extract(
&self,
pdf_bytes: &[u8],
config: &ParseConfig,
) -> Result<Extraction, EthosError>
fn extract( &self, pdf_bytes: &[u8], config: &ParseConfig, ) -> Result<Extraction, EthosError>
config.pages); geometry arrives quantized.