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)
}public record ToolOptions {
public record Compress(Strength level) : ToolOptions
public record Rotate(Turn[] turns) : ToolOptions
public record Delete(uint[] pages) : ToolOptions
public record Extract(uint[] pages, bool separate) : ToolOptions
public record Organize(Slot[] slots) : ToolOptions
public record Split(SplitBy by) : ToolOptions
public record Merge(bool bookmarks, bool numbers) : ToolOptions
public record Protect(string password, bool print, bool copy, bool edit) : ToolOptions
public record Unlock(string password) : ToolOptions
public record Flatten(FlattenMode mode, double dpi) : ToolOptions
public record Crop(CropMargins margins, CropScope scope) : ToolOptions
public record Repair() : ToolOptions
public record Privacy(PrivacyChoice? choice) : ToolOptions
public record Ocr(string language, bool allPages) : ToolOptions
public record PageNumbers(PageNumberOptions o) : ToolOptions
public record Watermark(WatermarkOptions o) : ToolOptions
public record Sign(SignatureMark mark, Area area, bool everyPage) : ToolOptions
public record Redact(Area[] areas, bool keepText, RgbColor color, bool usesPatterns, string[] terms) : ToolOptions
public record ToImages(uint from, uint? to, double dpi, bool png) : ToolOptions
public record ToWord(bool flow, uint from, uint? to) : ToolOptions
public record ToExcel(SheetContent content, bool csv, uint from, uint? to) : ToolOptions
public record FromImages(ImageFit fit, double margin, bool searchable) : ToolOptions
public record TextToPdf(TextKind kind, Paper paper, double margin, bool headerFooter, string title) : ToolOptions
public record FillForm(FieldValue[] values, bool flatten) : ToolOptions
public record Scan(bool duplex, bool dropBlank, bool ocr, bool compress) : ToolOptions
}pub enum ToolOptions {
Compress { level: Strength },
Rotate { turns: Vec<Turn> },
Delete { pages: Vec<u32> },
Extract { pages: Vec<u32>, separate: bool },
Organize { slots: Vec<Slot> },
Split { by: SplitBy },
Merge { bookmarks: bool, numbers: bool },
Protect { password: String, print: bool, copy: bool, edit: bool },
Unlock { password: String },
Flatten { mode: FlattenMode, dpi: f64 },
Crop { margins: CropMargins, scope: CropScope },
Repair,
Privacy { choice: Option<PrivacyChoice> },
Ocr { language: String, all_pages: bool },
PageNumbers { o: PageNumberOptions },
Watermark { o: WatermarkOptions },
Sign { mark: SignatureMark, area: Area, every_page: bool },
Redact { areas: Vec<Area>, keep_text: bool, color: RgbColor, uses_patterns: bool, terms: Vec<String> },
ToImages { from: u32, to: Option<u32>, dpi: f64, png: bool },
ToWord { flow: bool, from: u32, to: Option<u32> },
ToExcel { content: SheetContent, csv: bool, from: u32, to: Option<u32> },
FromImages { fit: ImageFit, margin: f64, searchable: bool },
TextToPdf { kind: TextKind, paper: Paper, margin: f64, header_footer: bool, title: String },
FillForm { values: Vec<FieldValue>, flatten: bool },
Scan { duplex: bool, drop_blank: bool, ocr: bool, compress: bool },
}Variants
| Variant | Fields | Description |
|---|---|---|
Compress | level: Strength | No description yet. |
Rotate | turns: Vec<Turn> | No description yet. |
Delete | pages: Vec<u32> | No description yet. |
Extract | pages: Vec<u32>separate: bool | No description yet. |
Organize | slots: Vec<Slot> | No description yet. |
Split | by: SplitBy | No description yet. |
Merge | bookmarks: boolnumbers: bool | the other files come as further inputs, in order |
Protect | password: Stringprint: boolcopy: booledit: bool | No description yet. |
Unlock | password: String | No description yet. |
Flatten | mode: FlattenModedpi: f64 | No description yet. |
Crop | margins: CropMarginsscope: CropScope | No description yet. |
Repair | – | No description yet. |
Privacy | choice: Option<PrivacyChoice> | No description yet. |
Ocr | language: Stringall_pages: bool | all_pages: every page without text (Pro beyond three) |
PageNumbers | o: PageNumberOptions | No description yet. |
Watermark | o: WatermarkOptions | No description yet. |
Sign | mark: SignatureMarkarea: Areaevery_page: bool | No description yet. |
Redact | areas: Vec<Area>keep_text: boolcolor: RgbColoruses_patterns: boolterms: 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 |
ToImages | from: u32to: Option<u32>dpi: f64png: bool | No description yet. |
ToWord | flow: boolfrom: u32to: 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 |
ToExcel | content: SheetContentcsv: boolfrom: u32to: Option<u32> | csv: the tables as CSV instead of a workbook |
FromImages | fit: ImageFitmargin: f64searchable: bool | the inputs are pictures |
TextToPdf | kind: TextKindpaper: Papermargin: f64header_footer: booltitle: String | the input is a text file of this kind |
FillForm | values: Vec<FieldValue>flatten: bool | No description yet. |
Scan | duplex: booldrop_blank: boolocr: boolcompress: 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
Signatures are generated from the engine’s code. Swift is checked against the generated bindings; C# follows the bindings generator’s naming rules.