A Docker image that detects the language of a PDF or text and writes the result to a TXT file or sets language on a PDF output.
You need Docker installed. The first run downloads the image and may take longer than later runs.
Mount a folder into the container and run a subcommand:
docker run --rm -v "$(pwd)":/data -w /data pdfix/detect-language:latest <command> [options]lang-detect: Detect language from PDF, TXT, inline text, or text string → output PDF or TXT
Supported combinations: PDF → PDF, PDF → TXT, TXT → TXT, or free text → TXT.
| Option | Required | Type / expected value | Description |
|---|---|---|---|
--input, -i |
yes | Path to an existing .pdf or .txt file, or a raw text string |
Source text or file |
--output, -o |
yes | Path for output .pdf or .txt (must match the chosen mode) |
Output file |
--name |
no | String (PDFix account license name); required for PDF → PDF | PDFix license name |
--key |
no | String (PDFix account license key); required for PDF → PDF | PDFix license key |
Detect language and write a language code to output.txt:
docker run --rm -v "$(pwd)":/data -w /data pdfix/detect-language:latest \
lang-detect -i /data/input.pdf -o /data/output.txtSet detected language on an output PDF (requires PDFix license for PDF output):
docker run --rm -v "$(pwd)":/data -w /data pdfix/detect-language:latest \
lang-detect --name "${LICENSE_NAME}" --key "${LICENSE_KEY}" \
-i /data/input.pdf -o /data/output.pdfFor PDFix SDK licensing or issues, contact support@pdfix.net.
Trial versions of the PDFix SDK may apply watermarks and redact random content in the output PDF.