Skip to main content

InputFormat

Enum InputFormat 

Source
pub enum InputFormat {
Show 47 variants Docx, Pptx, Html, Image, Pdf, Asciidoc, Md, Csv, Xlsx, Doc, Xls, Ppt, Odt, Ods, Odp, XmlUspto, XmlJats, XmlXbrl, XmlDoclang, DocTags, Dclx, MetsGbs, JsonDocling, Audio, Video, Vtt, Ebcdic, Latex, Email, Epub, Mhtml, Rtf, Visio, Svg, Pages, Numbers, Keynote, Abiword, WordPerfect, Works, Dbf, Dif, Sylk, QuattroPro, Lotus, StarOffice5, Djvu,
}
Expand description

A document format supported by docling.rs backends.

Variants§

§

Docx

§

Pptx

§

Html

§

Image

§

Pdf

§

Asciidoc

§

Md

§

Csv

§

Xlsx

§

Doc

Word 97–2004 binary (.doc) — parsed natively (CFB + MS-DOC), no external converter (docling shells out to LibreOffice for these).

§

Xls

Excel 97–2004 binary (.xls, BIFF8) — parsed natively via calamine.

§

Ppt

PowerPoint 97–2003 binary (.ppt) — parsed natively (CFB + MS-PPT).

§

Odt

§

Ods

§

Odp

§

XmlUspto

§

XmlJats

§

XmlXbrl

§

XmlDoclang

§

DocTags

Raw DocTags markup (.doctags/.dt) — the token stream docling’s VLMs emit, parsed by docling_core::doctags (#152).

§

Dclx

A DocLang OPC archive (.dclx, the format --to dclx writes).

§

MetsGbs

§

JsonDocling

§

Audio

§

Video

Video containers (.mp4/.avi/.mov/.mkv/.webm) — Phase 1 of issue #138 transcribes the audio track through the ASR pipeline (mirrors docling’s InputFormat.VIDEO, v2.114).

§

Vtt

§

Ebcdic

EBCDIC mainframe data + JSON copybook layout (#252, docling 2.118).

§

Latex

§

Email

§

Epub

§

Mhtml

MIME HTML archive (.mhtml/.mht) — docling’s InputFormat.MHTML (docling#4184), unwrapped and converted as HTML.

§

Rtf

Rich Text Format (.rtf) — a docling.rs extension (#209); docling converts RTF only by shelling out to LibreOffice.

§

Visio

Microsoft Visio (.vsdx, .vsdm) — a docling.rs extension (#214); docling has no Visio reader. Pages become sections, shape text flows in reading order, connectors become a relations table.

§

Svg

SVG (.svg) — a docling.rs extension (#212); docling does not accept SVG input. Mirrors the pdf / pdf-text split: the ML build rasterizes (resvg) and rides the image pipeline; without ML — or under --no-ocr — <text> elements are extracted directly into flat paragraphs.

§

Pages

Apple Pages (.pages) — a conformance format (#318, #383): mirrors docling’s IWorkPagesDocumentBackend for both the 2013+ IWA package and the iWork ’09 index.xml generation.

§

Numbers

Apple Numbers (.numbers), same IWA machinery as Self::Pages.

§

Keynote

Apple Keynote (.key), same IWA machinery as Self::Pages.

§

Abiword

AbiWord (.abw/.zabw/.awt) — a docling.rs extension (#216); AWML XML (gzip-wrapped for .zabw), parsed natively.

§

WordPerfect

WordPerfect 5.x / 6.x+ documents (.wpd, .wp, .wp5, .wp6, .wpt) — a docling.rs extension (#216); the ÿWPC byte stream is parsed natively (docling reaches WordPerfect only via LibreOffice’s libwpd), text-level with bold/italic/underline runs.

§

Works

Microsoft Works word-processor documents (.wps) — a docling.rs extension (#216); Works 2.x DOS / 3 / 4 (WPS4) and Works 2000 / 6–9 (WPS8, OLE CONTENTS) parsed natively after libwps’ readers.

§

Dbf

dBase table (.dbf) — a docling.rs extension (#216); the field descriptors become the header row, records the data rows.

§

Dif

Data Interchange Format (.dif) — a docling.rs extension (#216); sheet snapshot, split into data regions like an ODS sheet.

§

Sylk

SYLK (.slk/.sylk) — a docling.rs extension (#216); same sheet-region conversion as DIF.

§

QuattroPro

Quattro Pro spreadsheets (.wq1/.wq2 DOS, .wb1–.wb3 Windows, .qpw 9–X9) — a docling.rs extension (#216) parsed natively after libwps’ readers.

§

Lotus

Lotus 1-2-3 / Symphony / MS Works spreadsheets (.wk1–.wk4, .wks, .wrk, .123) — a docling.rs extension (#216); the DOS-era record streams, content-sniffed on the BOF record and split into data regions like an ODS sheet.

§

StarOffice5

StarOffice 5 binaries (.sdw/.sda/.sdd/.vor) — a docling.rs extension (#215); CFB containers parsed natively (text-level extraction). The document kind comes from the stream inside, so a .vor template of any application dispatches by content. StarCalc (.sdc) is a follow-up.

§

Djvu

DjVu scanned documents (.djvu/.djv) — a docling.rs extension (#434); docling has no DjVu reader. Decoded in pure Rust (djvu-rs): the hidden per-page text layer by default, rasterize + OCR for scan-only pages when the ML pipeline is built.

Implementations§

Source§

impl InputFormat

Source

pub fn as_str(self) -> &'static str

Stable string identifier, matching the Python enum values.

Source

pub fn from_extension(ext: &str) -> Option<Self>

Best-effort format detection from a file extension (case-insensitive).

Ambiguous extensions (notably bare xml) resolve to a single default here; the converter’s content sniffing does the real disambiguation.

Trait Implementations§

Source§

impl Clone for InputFormat

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for InputFormat

Source§

impl Debug for InputFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for InputFormat

Source§

impl Hash for InputFormat

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for InputFormat

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for InputFormat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V