Skip to main content

ConvertArgs

Struct ConvertArgs 

Source
pub struct ConvertArgs {
Show 24 fields pub input: PathBuf, pub output: PathBuf, pub config: Option<PathBuf>, pub ocr: bool, pub upscale: bool, pub deskew: bool, pub margin_trim: f32, pub dpi: u32, pub jpeg_quality: u8, pub threads: Option<usize>, pub chunk_size: usize, pub gpu: bool, pub verbose: u8, pub quiet: bool, pub dry_run: bool, pub internal_resolution: bool, pub color_correction: bool, pub offset_alignment: bool, pub output_height: u32, pub advanced: bool, pub skip_existing: bool, pub force: bool, pub max_pages: Option<usize>, pub save_debug: bool, /* private fields */
}
Expand description

Arguments for the convert command

Fields§

§input: PathBuf

Input PDF file or directory

§output: PathBuf

Output directory

§config: Option<PathBuf>

Configuration file path (TOML format)

§ocr: bool

Enable Japanese OCR (YomiToku)

§upscale: bool

Enable AI upscaling (RealESRGAN)

§deskew: bool

Enable deskew correction

§margin_trim: f32

Margin trim percentage

§dpi: u32

Output DPI (1-4800)

§jpeg_quality: u8

JPEG quality for PDF image compression (1-100, higher = better quality, larger file)

§threads: Option<usize>

Number of parallel threads

§chunk_size: usize

Chunk size for memory-controlled parallel processing (0 = process all at once)

§gpu: bool

Enable GPU processing

§verbose: u8

Verbosity level (-v, -vv, -vvv)

§quiet: bool

Suppress progress output

§dry_run: bool

Show execution plan without processing

§internal_resolution: bool

Enable internal resolution normalization (4960x7016)

§color_correction: bool

Enable global color correction

§offset_alignment: bool

Enable page number offset alignment

§output_height: u32

Output height in pixels (default: 3508)

§advanced: bool

Enable advanced processing for best quality output (includes: internal resolution normalization, color correction, offset alignment)

§skip_existing: bool

Skip files if output already exists

§force: bool

Force re-processing even if cache is valid

§max_pages: Option<usize>

Maximum pages to process (for debugging)

§save_debug: bool

Save intermediate debug images

Implementations§

Source§

impl ConvertArgs

Source

pub fn effective_upscale(&self) -> bool

Get effective upscale setting (considering –no-upscale flag)

Source

pub fn effective_deskew(&self) -> bool

Get effective deskew setting (considering –no-deskew flag)

Source

pub fn effective_gpu(&self) -> bool

Get effective GPU setting (considering –no-gpu flag)

Source

pub fn thread_count(&self) -> usize

Get thread count (default to available CPUs)

Source

pub fn effective_internal_resolution(&self) -> bool

Get effective internal resolution setting (considering –advanced flag)

Source

pub fn effective_color_correction(&self) -> bool

Get effective color correction setting (considering –advanced flag)

Source

pub fn effective_offset_alignment(&self) -> bool

Get effective offset alignment setting (considering –advanced flag)

Trait Implementations§

Source§

impl Args for ConvertArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for ConvertArgs

Source§

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

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

impl FromArgMatches for ConvertArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

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<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<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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.