Command-line Options for Ephesoft Tools

Command-line Options for Ephesoft Tools

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

RecoStar Commands

HOCR

RecostarPlugin.exe “<rsbatch_file_path>” “<FPR.rsp_file_path>” bd <OCR_core_from_license><recostar_license_file_path>” _HOCR.xml <ocrConfidenceSwitch> <deskewSwitch> <encryptionKey> RECOSTAR_HOCR

Example (with no encryption key):

RecostarPlugin.exe “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI25\FileList.rsbatch” “F:\Ephesoft31\SharedFolders\BC5\fixed-form-extraction\Fpr.rsp” bd 4 “F:\\Ephesoft31\\Application/native/RecostarPlugin/bin\RSO2-NET.707″ _HOCR.xml ON OFF OFF RECOSTAR_HOCR

Example (with encryption key):

RecostarPlugin.exe “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI26\FileList.rsbatch” “F:\Ephesoft31\SharedFolders\BC5\fixed-form-extraction\Fpr.rsp” bd 8 “F:\\Ephesoft31\\Application/native/RecostarPlugin/bin\RSO2-NET.707” _HOCR.xml ON OFF f97beb0a4808f0cd0ce1a8fa7d9b686e RECOSTAR_HOCR

TIFF to PDF Conversion

RecostarPlugin.exe “<TifToPDF_rsbatch_file_path>” “<FPR_pdf.rsp_file_path>” pdf <OCR_core_from_license><recostar_license_file_path>” “<output_pdf_file_path><ocrConfidenceSwitch> <deskewSwitch> <encryptionKey> RECOSTAR_HOCR

Example:

RecostarPlugin.exe “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI24\TifToPdf.rsbatchDOC2” “F:\Ephesoft31\SharedFolders\BC5\fixed-form-extraction\FPR_Pdf.rsp” pdf 4 “F:\\Ephesoft31\\Application/native/RecostarPlugin/bin\RSO2-NET.707” “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI24\tempfile_BI24_documentDOC2.pdf” OFF OFF OFF RECOSTAR_HOCR

PDF to TIFF Conversion

saveimage.exe “<pdf_file_path><compressionRatio> <appendPadding>

Example:

saveimage.exe “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI24\tempfile_BI24_documentDOC2.pdf” 70 true

saveimage.exe “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI24\tempfile_BI24_documentDOC2.pdf” 10 false

Extraction

RecostarPlugin.exe “<rsbatch_file_path>” “<extraction_rsp_file_path>” xml <OCR_core_from_license><recostar_license_file_path>” ++++ <ocrConfidenceSwitch> <deskewSwitch> <encryptionKey> RECOSTAR_HOCR

Example:

RecostarPlugin.exe “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI2A\aaaa.rsp.rsbatch” “F:\Ephesoft31\SharedFolders\BC4\fixed-form-extraction\aaaa.rsp” xml 4 “F:\\Ephesoft31\\Application/native/RecostarPlugin/bin\RSO2-NET.707” ++++ OFF OFF OFF RECOSTAR_HOCR

Ghostscript Commands

PDF to TIFF Conversion

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

Example:

gswin64c.exe -dNOPAUSE -r300 -sDEVICE=tiffscaled24 -sCompression=lzw -dBATCH -sOutputFile=”F:\Ephesoft31\SharedFolders\mailroom-import-copy1\multipage-pdf-pdf-1407824575554\multipage-pdf-%04d.tif” “F:\Ephesoft31\SharedFolders\mailroom-import-copy1\multipage-pdf-pdf-1407824575554\multipage-pdf.pdf”

PDF Optimization

gswin64c.exe -q -dNODISPLAY -P- -dSAFER -dDELAYSAFER — pdfopt.ps “<input_pdf_file_path>” “<output_pdf_file_path>

Example:

gswin64c.exe -q -dNODISPLAY -P- -dSAFER -dDELAYSAFER — pdfopt.ps “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI25\tempfile_BI25_documentDOC1.pdf” “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI25\BI25_documentDOC1.pdf”

ImageMagick Commands

Convert.exe <conversion_param><input_file_path>” “<output_file_path>

TIFF to TIFF Conversion

Example:

Convert.exe -limit area 100mb “F:\Ephesoft31\SharedFolders\mailroom-import-copy2\us-invoice\US-Invoice.tif” -compress LZW “F:\Ephesoft31\SharedFolders\mailroom-import-copy2\us-invoice\US-Invoice-%04d.tif”

TIFF to PNG Conversion

Example:

Convert.exe “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI23\BI23_0.tif” -colorspace gray -alpha off “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI23\BI23_PG0.png”

Example:

Convert.exe “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI23\BI23_0.tif” -colorspace rgb -thumbnail 200×150 “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI23\BI23_PG0_displayThumb.png”

Colored TIFF to PDF Conversion

Example:

Convert.exe test.tif -quality 100.0 -compress LZW out.pdf

Non-colored TIFF to PDF Conversion

Example:

Convert.exe test.tif -quality 100.0 -monochrome -compress LZW out.pdf

PDF to TIFF Conversion

Example:

Convert.exe -limit area 100mb “F:\Ephesoft31\SharedFolders\BC4\test-classification\multipage-pdf.pdf” -compress LZW “F:\Ephesoft31\SharedFolders\BC4\test-classification\multipage-pdf-%04d.tif”

Note: To use ImageMagick to convert from PDF to TIFF, you will need to copy the gs32bit files to the gs directory path. Alternatively, this path can be overridden in <Ephesoft_Directory>\Dependencies\ImageMagick\delegates.xml by replacing the following parameter with the complete gs.exe path:

@PSDelegate@

Tesseract HOCR Command

TesseractConsole.exe “<input_TIFF_file_path>” “<output_html_file_path_without_.html_extension>” “-l eng” +”<hocr.txt_file_path>

Example:

TesseractConsole.exe ”F:\\Ephesoft31\\Application/native/Tesseract-OCR\TesseractConsole.exe” “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI29\BI29_5.tif” “F:\Ephesoft31\SharedFolders\ephesoft-system-folder\BI29\BI29_PG5” “-l eng” +”F:\\Ephesoft31\\Application/native/Tesseract-OCR\hocr.txt”

ZXing Command to Extract Barcode Value

Note: ZXing is only applicable to PNG files, and will not work with TIFF files.

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

Example:

java -cp zxing-1.6.0.jar;.; com.google.zxing.client.j2se.CommandLineRunner a.png

hasdf
Figure 1. Command Line Example

LibreOffice Convert-to Command

Example:

C:\Ephesoft\Dependencies\libreoffice\App\libreoffice\program\soffice.exe -invisible -accept=socket,host=localhost,port=8100;urp; –convert-to pdf C:\Users\Administrator\Downloads\test.txt