Skip to main content

ConversionOptions

Struct ConversionOptions 

Source
pub struct ConversionOptions<'a> {
    pub format: Option<InputFormat>,
    pub include_bookmarks: bool,
    pub allow_damaged: bool,
    pub text_header_policy: TextHeaderPolicy,
    pub fonts: Option<Fonts<'a>>,
}
Expand description

What convert produces from a document.

Fields§

§format: Option<InputFormat>

The input family; None detects it from the leading signature. An explicit PDF must start with its %PDF- header.

§include_bookmarks: bool

Write the CAJ, PDF or HN-A outline. C8/HN-B outlines are unverified and never written; ConversionReport::outline says when one was omitted.

§allow_damaged: bool

Replace damaged CAJ pages with blank pages and report every omission.

§text_header_policy: TextHeaderPolicy

Validation of HN/C8 type-3 text-region headers. The default admits the measured HN/C8 unused-refinement-template anomaly; general JBIG2 APIs and every other malformed flag stay strict.

§fonts: Option<Fonts<'a>>

Fonts for native HN/C8 text. The core decides once per document whether its text is native (crate::hnc8::uses_native_text); image documents leave the fonts unread, so their PDF is byte-identical to a conversion without fonts. Any other format refuses fonts with FONTS_REQUIRE_HNC8.

Trait Implementations§

Source§

impl Default for ConversionOptions<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for ConversionOptions<'a>

§

impl<'a> !Send for ConversionOptions<'a>

§

impl<'a> !Sync for ConversionOptions<'a>

§

impl<'a> !UnwindSafe for ConversionOptions<'a>

§

impl<'a> Freeze for ConversionOptions<'a>

§

impl<'a> Unpin for ConversionOptions<'a>

§

impl<'a> UnsafeUnpin for ConversionOptions<'a>

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<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> Same for T

Source§

type Output = T

Should always be Self
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.