Reference · Enum · tools.rs

ToolOptions Enum

No description yet.

enum ToolOptions {
    case compress(level: Strength)
    case rotate(turns: [Turn])
    case delete(pages: [UInt32])
    case extract(pages: [UInt32], separate: Bool)
    case organize(slots: [Slot])
    case split(by: SplitBy)
    case merge(bookmarks: Bool, numbers: Bool)
    case protect(password: String, print: Bool, copy: Bool, edit: Bool)
    case unlock(password: String)
    case flatten(mode: FlattenMode, dpi: Double)
    case crop(margins: CropMargins, scope: CropScope)
    case repair
    case privacy(choice: PrivacyChoice?)
    case ocr(language: String, allPages: Bool)
    case pageNumbers(o: PageNumberOptions)
    case watermark(o: WatermarkOptions)
    case sign(mark: SignatureMark, area: Area, everyPage: Bool)
    case redact(areas: [Area], keepText: Bool, color: RgbColor, usesPatterns: Bool, terms: [String])
    case toImages(from: UInt32, to: UInt32?, dpi: Double, png: Bool)
    case toWord(flow: Bool, from: UInt32, to: UInt32?)
    case toExcel(content: SheetContent, csv: Bool, from: UInt32, to: UInt32?)
    case fromImages(fit: ImageFit, margin: Double, searchable: Bool)
    case textToPdf(kind: TextKind, paper: Paper, margin: Double, headerFooter: Bool, title: String)
    case fillForm(values: [FieldValue], flatten: Bool)
    case scan(duplex: Bool, dropBlank: Bool, ocr: Bool, compress: Bool)
}

Variants

VariantFieldsDescription
Compresslevel: StrengthNo description yet.
Rotateturns: Vec<Turn>No description yet.
Deletepages: Vec<u32>No description yet.
Extractpages: Vec<u32>
separate: bool
No description yet.
Organizeslots: Vec<Slot>No description yet.
Splitby: SplitByNo description yet.
Mergebookmarks: bool
numbers: bool
the other files come as further inputs, in order
Protectpassword: String
print: bool
copy: bool
edit: bool
No description yet.
Unlockpassword: StringNo description yet.
Flattenmode: FlattenMode
dpi: f64
No description yet.
Cropmargins: CropMargins
scope: CropScope
No description yet.
Repair–No description yet.
Privacychoice: Option<PrivacyChoice>No description yet.
Ocrlanguage: String
all_pages: bool
all_pages: every page without text (Pro beyond three)
PageNumberso: PageNumberOptionsNo description yet.
Watermarko: WatermarkOptionsNo description yet.
Signmark: SignatureMark
area: Area
every_page: bool
No description yet.
Redactareas: Vec<Area>
keep_text: bool
color: RgbColor
uses_patterns: bool
terms: Vec<String>
keep_text (Pro): only what is under the boxes leaves; else the pages become pictures. terms: when the boxes come from a search, every text it found (RedactHit.text) and the words typed; they are also taken out of the document info, XMP, bookmarks, form fields, comments, attachments and scripts
ToImagesfrom: u32
to: Option<u32>
dpi: f64
png: bool
No description yet.
ToWordflow: bool
from: u32
to: Option<u32>
flow (Pro): paragraphs Word reflows, instead of every line in its place. from/to: a page range (0-based, to inclusive), for a file over the cap
ToExcelcontent: SheetContent
csv: bool
from: u32
to: Option<u32>
csv: the tables as CSV instead of a workbook
FromImagesfit: ImageFit
margin: f64
searchable: bool
the inputs are pictures
TextToPdfkind: TextKind
paper: Paper
margin: f64
header_footer: bool
title: String
the input is a text file of this kind
FillFormvalues: Vec<FieldValue>
flatten: bool
No description yet.
Scanduplex: bool
drop_blank: bool
ocr: bool
compress: bool
the inputs are scanned pictures, in the order taken

Used by

needs_password, options_from_json, options_summary, options_to_json, options_tool_id, options_with_password, run_tool, run_tool_batch, tool_title, uses_pro, HistoryEntry, WorkflowStep

Live demo

PDF to Word, PDF to Excel

Signatures are generated from the engine’s code. Swift is checked against the generated bindings; C# follows the bindings generator’s naming rules.