-
--files: One or more file paths to input PDF documents.
-
--pages, -p: Specify pages to translate (e.g., "1,2,1-,-3,3-5"). If not set, translate all pages
-
--split-short-lines: Force split short lines into different paragraphs (may cause poor typesetting & bugs)
-
--short-line-split-factor: Split threshold factor (default: 0.8). The actual threshold is the median length of all lines on the current page * this factor
-
--skip-clean: Skip PDF cleaning step
-
--dual-translate-first: Put translated pages first in dual PDF mode (default: original pages first)
-
--disable-rich-text-translate: Disable rich text translation (may help improve compatibility with some PDFs)
-
--enhance-compatibility: Enable all compatibility enhancement options (equivalent to --skip-clean --dual-translate-first --disable-rich-text-translate)
-
--use-alternating-pages-dual: Use alternating pages mode for dual PDF. When enabled, original and translated pages are arranged in alternate order. When disabled (default), original and translated pages are shown side by side on the same page.
-
--watermark-output-mode: [DEPRECATED] Watermarks are no longer added; this option still controls output file names and count.
-
--max-pages-per-part: Maximum number of pages per part for split translation. If not set, no splitting will be performed.
-
--no-watermark: [DEPRECATED] Watermarks are no longer added; this option still affects output file names and count.
-
--translate-table-text: Translate table text (experimental, default: False)
-
--formular-font-pattern: Font pattern to identify formula text (default: None)
-
--formular-char-pattern: Character pattern to identify formula text (default: None)
-
--show-char-box: Show character bounding boxes (debug only, default: False)
-
--skip-scanned-detection: Skip scanned document detection (default: False). When using split translation, only the first part performs detection if not skipped.
-
--ocr-workaround: Use OCR workaround (default: False). Only suitable for documents with black text on white background. When enabled, white rectangular blocks will be added below the translation to cover the original text content, and all text will be forced to black color.
-
--auto-enable-ocr-workaround: Enable automatic OCR workaround (default: False). If a document is detected as heavily scanned, this will attempt to enable OCR processing and skip further scan detection. See "Important Interaction Note" below for crucial details on how this interacts with --ocr-workaround and --skip-scanned-detection.
-
--primary-font-family: Override primary font family for translated text. Choices: 'serif' for serif fonts, 'sans-serif' for sans-serif fonts, 'script' for script/italic fonts. If not specified, uses automatic font selection based on original text properties.
-
--only-include-translated-page: Only include translated pages in the output PDF. This option is only effective when --pages is used. (default: False)
-
--merge-alternating-line-numbers: Enable post-processing to merge alternating line-number layouts (keep the number paragraph as an independent paragraph b; merge adjacent text paragraphs a and c across it when layout_id and xobj_id match, digits are ASCII and spaces only). Default: off.
-
--skip-form-render: Skip form rendering (default: False). When enabled, PDF forms will not be rendered in the output.
-
--skip-curve-render: Skip curve rendering (default: False). When enabled, PDF curves will not be rendered in the output.
-
--only-parse-generate-pdf: Only parse PDF and generate output PDF without translation (default: False). This skips all translation-related processing including layout analysis, paragraph finding, style processing, and translation itself. Useful for testing PDF parsing and reconstruction functionality.
-
--remove-non-formula-lines: Remove non-formula lines from paragraph areas (default: False). This removes decorative lines that are not part of formulas, while protecting lines in figure/table areas. Useful for cleaning up documents with decorative elements that interfere with text flow.
-
--non-formula-line-iou-threshold: IoU threshold for detecting paragraph overlap when removing non-formula lines (default: 0.9). Higher values are more conservative and will remove fewer lines.
-
--figure-table-protection-threshold: IoU threshold for protecting lines in figure/table areas when removing non-formula lines (default: 0.9). Higher values provide more protection for structural elements in figures and tables.
-
--rpc-doclayout: RPC service host address for document layout analysis (default: None)
-
--working-dir: Working directory for translation. If not set, use temp directory.
-
--no-auto-extract-glossary: Disable automatic term extraction. If this flag is present, the step is skipped. Defaults to enabled.
-
--save-auto-extracted-glossary: Save automatically extracted glossary to the specified file. If not set, the glossary will not be saved.