Ephesoft’s Linux Command Line Tool

This page lists the Linux command-line options for most applications included in Ephesoft Transact.

Jump to:

Nuance Commands

OCR

<path_to_NuanceOCR_executable> <path_to_input_image> <path_to_output_HOCR.xml_file> <path_to_Nuance_Iczx_license_file> <page_number_identifier (used to assign page ID value in HOCR)> <path_to_Nuance_Settings.sts_file> <auto_rotate_switch> <OCR_confidence_switch> <optional_zon_file_if_nuance_extraction_should_be_used> <optional_nuance_extraction_switch>

Example:

./NuanceOCR ./a-0001.tif NuanceOCR.xml ./lcxz PG0 ./SETTINGS.STS ON ON
A
Figure 1. Nuance OCR Command

Extraction

<path_to_NuanceOCR_executable> <path_to_input_image> <path_to_output_HOCR.xml_file> <path_to_Nuance_Iczx_license_file> <page_number_identifier (used to assign page ID value in HOCR)> <path_to_Nuance_Settings.sts_file> <auto_rotate_switch> <OCR_confidence_switch> <zon_file_if_Nuance_extraction_should_be_used> <Nuance_extraction_switch>

Example:

./NuanceOCR ./a-0001.tif NuanceExtraction.xml ./lcxz PG0 ./SETTINGS.STS ON ON ./docsample.zon ON
B
Figure 2. Nuance Extraction Command

Ghostscript Commands

PDF to TIFF Conversion

gs -dNOPAUSE -r300 -sDEVICE=tiff24nc -sCompression=lzw -dBATCH -sOutputFile=”<output_tiff_filename>-%04d.tif” “<input_pdf_file_path>

Note: In Linux, Ephesoft uses -sDEVICE as tiff24nc instead of tiffscaled24, as Ghostscript in Linux does not support tiffscaled24.

Example:

gs -dNOPAUSE -r300 -sDEVICE=tiff24nc -sCompressionlzw -dBATCH -sOutputFile="a-%04d.tif" ./multipage-pdf.pdf
3
Figure 3. Ghostscript PDF to TIFF

PDF Optimization

PDF optimization is not supported by Ghostscript on Linux.

ImageMagick Commands

convert <conversion_param> <input_file_path>” “<output_file_path>

TIFF to TIFF Conversion

Example:

convert -limit area 100mb .\multipage-tif.tif -compress LZW a-%04d.tif"
4
Figure 4. ImageMagick TIFF to TIFF

TIFF to PNG Conversion

convert .\multipage-tif.tif -colorspace gray -alpha off a-%04d.png
5
Figure 5. ImageMagick TIFF to TIFF

TIFF to PNG Thumbnail Conversion

convert .\sample.tif -colorspace rgb -thumbnail 200x150 a-%04d.png
6
Figure 6. ImageMagick TIFF to PNG

Colored TIFF to PDF Conversion

convert test.tif -quality 100.0 -compress LZW out.pdf
7
Figure 7. ImageMagick Colored TIFF to PDF

Non-colored TIFF to PDF Conversion

convert test.tif -quality 100.0 -monochrome -compress LZW out.pdf
8
Figure 8. ImageMagick Non-colored TIFF to PDF

PDF to TIFF Conversion

convert -limit area 100mb sample.pdf -compress LZW a-%04d.tif
9
Figure 9. ImageMagick PDF to TIFF

Tesseract HOCR Command

tesseract "<input_TIFF_file_path>" "<output_html_file_path_without_.html_extension>" "-l eng" +"<hocr.txt_file_path>"

Example:

tesseract ./a.tif out –l eng +./hocr.txt

ZXing Command to Extract Barcode Value

java -cp zxing-1.6.0.jar:.: com.google.zxing.client.j2se.CommandLineRunner “<png_file_path>