2TIFF Command Line Syntax

2TIFF is a command line utility that can batch convert various types of files to TIFF format. It has many additional actions: compression, watermarking, resizing, rotation, post-processing, and a wide range of adjustable parameters. The program doesn't have GUI so that you can run 2TIFF commands from any command line interpreter, such as Command Prompt or Windows Powershell.

How to quick start batch conversion

  1. Open the Windows Command Prompt by pressing Win + R combination on your keyboard, then type in cmd.exe and press Enter:

    Open Windows Command Prompt (cmd.exe)

    You can use Command Prompt or another command language interpreter that's comfortable for you to use.
  2. Add switches and parameters after 2tiff.exe. The basic command is as follows:
  3. 2tiff.exe -src "C:\In\*.*" -dst "C:\Out"

    • -src stands for a source for files. It can be a path to a folder or a single file, or a list (a .txt with file paths). Examples: -src "C:\In\*.*"; -src "@C:\Files\list.txt"
    • *.* is a mask that must be added after the folder path so that 2TIFF can process any files from a specified location. *.* means any filename – point – any file extension. Asterisk (star, *) is a wildcard character which stands for any string of characters (or no characters at all);
    • -dst should be followed by the destination for output files. For example: -dst "C:\Out"
    When indicating the source folder path (or path to a file) and/or destination folder, enclose them in double quotation marks. Example: -src "C:\In\Invoice.docx".
  4. Press Enter to execute the command. All files from the source (-src) will be converted in batch mode.

Сommand line structure

The command line string can contain as many switches and parameters with values as needed. 2TIFF command line structure looks like this:

2tiff.exe - [param1:value paramN:value] - [parameters]

To see a prompt with all available switches and parameters, type 2tiff.exe and press Enter:

2tiff.exe

2TIFF prompt with command line syntax and examples

Switches

Use switches to set source and destination for files, select additional operations, configure common options, and more. You can enter several parameters (parameter:value) within a single switch, separated by space.

Switch Description
-src Source for files. A source can be:

  • a folder. Example: -src "C:\In\*.*"
  • a single file. Example: -src "C:\In\Report.pdf"
  • a list with file destinations. Example: -src "@C:\Files\list.txt"

This switch should be followed by the source folder path where files are located, or path to a file, or path to a list, enclosed in double quotation marks.

For a folder as a source, you can filter input files by mask, e.g., *.pdf. To allow processing any files, use *.*

To set a list of files as a source, use @ before the file path. A list must consist of file paths with each path on a separate line, and it should be saved in TXT format.

You can use multiple sources at once – enter them after -src one after another within double quotation marks, separated by a space. For example: -src "C:\In\*.*" "E:\Files\*.pdf" "@C:\Lists\list.txt"
-dst Destination folder path. For example: -dst "C:\Out" When using this switch, input the output folder location within double quotation marks.
-options Common options. Define common 2TIFF options, such as page range selection, processing files in subfolders (recursive scan), attachments handling, silent mode, and more. See section Common options (-options)
-tiff TIFF format parameters. See section TIFF format parameters (-tiff)
-oper Operation parameters. Various operations can be applied to the files, such as watermarking, resizing, rotation. See section Operation parameters (-oper)
-postproc Post-processing action. Copy, move, or delete files automatically after processing, if necessary. Can apply both to successfully converted and failed files. See section Post-processing action (-postproc)
-info Information about a certain document. See section Information (-info)
-about Information about the program. Shows license key and software version.
-ini Advanced settings available in the 2TIFF low-level settings editor. See section Advanced settings

Command line examples:

2tiff.exe -src "C:\In\*.pdf" -dst "C:\Out"

2tiff.exe -src "@C:\Files\list.txt" -dst "C:\Out"

2tiff.exe -src "C:\In\Document.docx" -dst "C:\Out"

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options scansf:no template:{*SrcFilename}-page{*SrcFileMPageNo}.{*DstFileExt}

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options scansf:no pages:"1,3,5-12" -oper autorotate direction:cw -postproc passed:move "C:\Processed"

Common options (-options)

pages: Set page range for files to be converted

Default value: all

Defines single pages or a page range for files that should be converted.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options pages:1,3,5-12

scansf: Scan subfolders

Values:
yes (default value), no

Scans subdirectories and converts files from them, too (subfolder recursion).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options scansf:no

keepsf: Restore structure of subfolders in the output folder

Values:
yes (default value), no

Keeps the same subfolder structure as in the input folder (if a folder is set as a source).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options keepsf:no

overwrite: Overwrite existing output files

Values:
no (default value), yes, skip

Overwrites existing files or skips files with the same filename.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options overwrite:skip

break_on_error: Stop the program on error

Values:
no (default value), yes

Stops the file conversion process in case of an error.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options break_on_error:yes

template: Use a filename template for output files

Default value: {*SrcFilename}{*WorksheetName}{*SrcFileMPageNo}.{*DstFileExt}

Automatically renames output files using a name template. By default, pages counter ({*SrcFileMPageNo}) appears only for multipage files split into separate pages.

Available macros:
{*SrcFilename} – source file name;
{*WorksheetName} – worksheet file name (for Excel and CAD source files only);
{*SrcFileMPageNo} – source file page number;
{*DstFileExt} – destination file extension.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options template:"Document-{*SrcFileMPageNo}.{*DstFileExt}"

srcpwd: Enter source file password(s)

Lets 2TIFF convert password-protected Word and PDF files. Enter a password in this format: srcpwd:password.

If a password contains spaces, input it between double quotation marks.

Example: srcpwd:"my password".

If you have files secured with more than one password, you can enter multiple passwords too.

Example: srcpwd:password1 srcpwd:password2 srcpwd:password3.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options srcpwd:"my password"

res: Set resolution for image rasterization

Values:
300 (default value), 72-4096

Define rasterization resolution for output TIFF files from 72 DPI to 4096 DPI. Use this variable if you convert vector documents (PDF, Word DOC, etc.) to TIFF. The default value is set to 300.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options res:600

attachments: Set up the processing of file attachments

Values:
ignore, separate (default value), combine

If you convert documents with attachments (e.g., correspondence with email attachments, PDF Portfolio files), you can select how 2TIFF should handle them:

  • ignore – do not convert attachments
  • separate – save attachments as separate files
  • combine – add attachments after the main document

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options attachments:before

sort: Sort files by a specific parameter

Values:
unsorted (default value), name, date, type, size, path, name_d, date_d, type_d, size_d, path_d

You can sort the output files by a specific parameter, such as name, date, type, size, or path. To sort the files in descending order, use values ending with _d (name_d, date_d, etc.).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options sort:type

silent: Suppress console output

Values:
no (default value), yes

Suppresses console output and runs file conversion silently without showing the process. The console window's information will not be displayed during processing, and dialog windows will not appear.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options silent:yes

alerts: Display alert windows

Values:
yes (default value), no

Displays alerts in case of an issue or error. If set to "no", you will not see any dialog windows, such as asking to register the program's license (if the free version is used). However, the information on the console window will be displayed during processing.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -options alerts:no

TIFF format parameters (-tiff)

bpp: Set bits per pixel

Values:
64, 48, 32, 24 (default value), 8, 4, 1

Define TIFF image color depth (bits per pixel). The number of bits is used to define the grayscale value or color value of a pixel.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff bpp:8

compression: Select algorithm of TIFF image compression

Values:
auto (default value), none, rle, fax3, fax4, lzw, flate, jpego, jbig, jpeg, packbits

Applies the method of TIFF image compression for output files.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff compression:lzw

jpeg_quality: Set quality of output TIFF image(s) when using JPEG compression type

Values:
85 (default value), 20...100

Sets the compression quality for output files if JPEG compression method ("JPEG-in-TIFF compression") is used.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff compression:jpeg jpeg_quality:100

jpeg_sample: Set sampling for JPEG compression type

Values:
111 (default value), 422, 411

Sets type of JPEG compression sampling if JPEG compression method ("JPEG-in-TIFF compression") is used.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff compression:jpeg jpeg_sample:422

compression_level: Set level of Flate compression for output TIFF image(s)

Values:
0, 1, 2, 3, 4, 5 (default value), 6, 7, 8, 9

Adjusts the compression level if Flate compression method is used.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff compression:flate compression_level:9

multipage: Set multipage option

Values:
split, asis (default value), append, prepend

Combines source files into multipage TIFFs or splits large files into single pages.

Multipage options:

  • as is – keeps the original file structure
  • split – splits multipage files into separate TIFF files
  • append – adds new files as pages to the end
  • prepend – adds new files as pages to the beginning

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff multipage:append

combine: Enter a filename for combined file

Default value: combined.tif

Defines the name of the output multipage TIFF file. You can enter any name before .tif. If you want to use more than one word with spaces, type it within double quotation marks. For example: "my multipage.tif"

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff multipage:append combine:"my multipage.tif"

byte_order: Select byte order

Values:
little_endian (default value), big_endian

Switches between little-endian byte order (low order) and big-endian byte order (high order).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff byte_order:big_endian

thumbnail: Create thumbnails

Values:
no (default value), yes

Creates thumbnail images for output files.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff thumbnail:yes

strip: Select strip structure

Values:
multi (default value), single, tiled

Defines image strip structure for converted files.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff strip:tiled

hres: Set custom horizontal resolution (DPI)

Values:

Default value: asis

Changes horizontal resolution to a custom DPI value.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff hres:200

vres: Set custom vertical resolution (DPI)

Values:

Default value: asis

Changes vertical resolution to a custom DPI value.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff vres:200

exif: Save EXIF data

Values:
yes (default value), no

Saves EXIF metadata in output TIFF images.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff exif:no

iptc: Save IPTC data

Values:
yes (default value), no

Saves IPTC metadata in output TIFF images.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff iptc:no

big_tiff: Convert to BigTIFF format

Values:
no (default value), yes

Uses BigTIFF (a TIFF format variation that supports large image files). We recommend using this feature if you have "heavy" files to convert so that output TIFFs can be up to 4 GB or more. Please note that not all commonly used image viewers are able to open BigTIFF files.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff big_tiff:yes

quant: Set image quantization level

Values:
8, 7, 6, 5, 4, 3, 2, 1, 0 (default value)

Quant parameter reduces the number of distinct colors used in an image while preserving visual quality.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff quant:5

dither: Use dithering

Values:
yes (default value), no

Applies dithering – a method that creates patterns of available colors to emulate colors of adjacent pixels eliminated during the color quantization process.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff dither:no

photometric_mono: Toggle photometric interpretation

Values:
asis (default value), min_is_white, min_is_black

Toggles the photometric interpretation for a monochrome (bi-level) image.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff photometric_mono:min_is_black

fill_order: Select fill order option

Values:
msb2lsb (default value), lsb2msb

Defines whether bits are not reversed before being stored or not. In practice, the use of lsb2msb is very uncommon and is not recommended.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff fill_order:lsb2msb

predictor: Use LZW/Flate predictor

Values:
yes (default value), no

Uses a compression predictor for LZW and Flate compression methods. With this parameter enabled, data can be encoded more compactly.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -tiff predictor:no

ASK US FOR HELP

Operation parameters (-oper)

-oper watermark

image: Set path to image watermark

Sets path to watermark image. Example: "C:\Watermark.png"

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png"

pages: Set page range for image watermark

Default value: all

Defines the range of pages on which the watermark will be placed. By default, the watermark is added to every page.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" pages:"1,3,5-12"

halign: Set horizontal alignment for image watermark

Values:
left (default value), center, right

Aligns image watermark horizontally: to the left, center, or right side of a sheet. Can be combined with other alignment and offset parameters.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" halign:center

valign: Set vertical alignment for image watermark

Values:
top (default value), center, bottom

Aligns image watermark vertically: to the top, center, or bottom of a sheet. Can be combined with other alignment and offset parameters.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" valign:bottom

units: Select units for horizontal and vertical offset values

Values:
pixels, percents (default value)

Uses percents or pixels as horizontal and vertical offset units.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" units:pixels offx:100 offy:-100

offx: Set horizontal offset value

Default value: 0

Shifts the pages' position horizontally using a specific value (in pixels/percent of the page width). Can be combined with other alignment and offset parameters.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" offx:20

offy: Set vertical offset value

Default value: 0

Shifts the pages' position vertically using a specific value (in pixels/percent of the page width). Can be combined with other alignment and offset parameters.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" offy:15

size: Set watermark size

Values:
-1 (default value), 1-100

Sets watermark size as percent of source file's page height and width. For example, enter size:15 for 15%. -1 is the default value, which applies the watermark "as is" using watermark's original size.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" size:15

angle: Set watermark rotation angle

Default value: 0

Rotates the watermark at a specific angle. The rotation is counterclockwise by default.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" angle:45

method: Select a blending method for watermark

Values:
alphablend (default value), overdraw

Sets a blending method for watermark – AlphaBlend or Overdraw.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper watermark image:"C:\Watermark.png" angle:90

-oper textwatermark

pages: Set page range for text watermark

Default value: all

Defines the range of pages on which the watermark will be placed, e.g., pages:1,3,5-12. By default, the watermark is added to every page.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" pages:1-3

text: Enter watermark text

Input any text within double quotation marks.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT"

font: Select font

Default value: Arial

Applies a specific font for text watermark.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" font:Verdana

fontsize: Set font size

Default value: 12

Sets size of a watermark font for text watermark.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" fontsize:9

fs_units: Select font size units: points or percents

Values:
points (default value), percents

Switches between points or percent (percent of image height) for specifying font size.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" fontsize:30 fs_units:percents

bold: Make font bold

Values:
no (default value), yes

Uses a bold version of a font for a text watermark.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" bold:yes

italic: Make font italic

Values:
no (default value), yes

Makes font for a text watermark italic.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" italic:yes

underline: Make font underlined

Values:
no (default value), yes

Makes font for a text watermark underlined.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" underline:yes

halign: Set horizontal alignment for text watermark

Values:
left (default value), center, right

Aligns text watermark horizontally: to the left, center, or right side of a sheet. Can be combined with other alignment and offset parameters.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" halign:center

valign: Set vertical alignment for text watermark

Values:
top (default value), center, bottom

Aligns image watermark vertically: to the top, center, or bottom of a sheet. Can be combined with other alignment and offset parameters.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" halign:bottom

units: Select units horizontal and vertical offset for text watermark

Values:
pixels, percents (default value)

Sets horizontal and vertical offset units: percents or pixels.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" units:pixels offx:100 offy:-100

offx: Set horizontal offset for text watermark

Default value: 0

Shifts the watermark's position horizontally using a specific value (in pixels/percent of the page width). Can be combined with other alignment and offset parameters.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" offx:20

offy: Set vertical offset for text watermark

Default value: 0

Shifts the watermark's position vertically using a specific value (in pixels/percent of the page width). Can be combined with other alignment and offset parameters.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" offy:15

color: Set text color for text watermark

Default value: "r:0,g:0,b:0,a:255"

Applies text color using RGBA color model – "r:(0-255),g:(0-255),b:(0-255);a:(0-255)".

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" color:"r:0,g:128,b:0,a:255"

bgcolor: Set text background color for text watermark

Default value: "r:255,g:255,b:255,a:255"

Applies text background color using RGBA color model – "r:(0-255),g:(0-255),b:(0-255);a:(0-255)".

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" bgcolor:"r:0,g:128,b:0,a:255"

angle: Set text watermark rotation angle

Default value: 0

Rotates the text watermark at a specific angle. You can select any arbitrary angle.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" angle:45

direction: Select direction of rotation for text watermark: CW or CCW

Values:
ccw (default value), cw

Sets direction for watermark rotation (clockwise or counterclockwise).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" angle:45 direction:cw

border: Draw border around text watermark

Values:
no (default value), yes

Adds a border around the text watermark.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper textwatermark text:"DRAFT" border:yes

-oper resize

pages: Set page range for resize operation

Default value: all

Defines single pages or a page range for files to be converted and resized.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper resize pages:1,3,5-10 size:"100 100"

size: Set new size of the image (width and height)

Default value: "0 0"

Defines width and height dimensions (in pixels) for file resizing. The source file proportions are kept.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper resize size:"100 100"

units: Select units for setting resize values

Values:
pixels (default value), percents

Uses pixels or percents as units for resize operation.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper resize size:"50" units:percents

fmode: Select Fit mode

Values:
fit_in_size (default value), thumbnail, fit_width, fit_height, fill_in_size, none

Applies page scaling to fit a specific size. Available values:

  • fit_in_size – Fit the size specified for the size: parameter. Oversized images will be shrunk to the defined width and height, and small ones will be enlarged to fit the page size;
  • thumbnail – Fit the size of a thumbnail;
  • fill_in_size – Fill the size specified for the size: parameter. The image will be positioned on the entire sheet by the smaller side (the longer side may go beyond the defined area);
  • fit_width – Fit the size specified for the size: parameter by width;
  • fit_height – Fit the size specified for the size: parameter by height.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper resize size:"300 300" fmode:fill_in_size

falign: Select Fit alignment

Values:
center (default value), left_top, right_bottom

Aligns the resized image to the center, left top corner, or right bottom corner.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper resize size:"300 300" fmode:thumbnail falign:right_bottom

nozoom: Enable/disable making image larger than original size

Values:
no (default value), yes

Allows image upscaling to meet the defined size dimensions. Disabled by default.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper resize size:"300 300" fmode:fill_in_size nozoom:yes

method: Select image resampling method

Values:
bilinear (default value), neighbour

Applies the nearest neighbor or bilinear interpolation resampling method for image resizing.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper resize size:"300 300" method:neighbour

color: Fill blank margins around the resized image with color

Default value: "r:255,g:255,b:255,a:255"

Fills blank margins around the resized image (if there are any) with a certain color using RGBA color model – "r:(0-255),g:(0-255),b:(0-255);a:(0-255)".

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper resize size:"300 300" color:"r:0,g:128,b:0,a:255"

-oper crop

method: Select method of image cropping

Values:
margins (default value), rect2p, rect_pwh, autocrop

Applies a specific image cropping method.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:rect_pwh

left: Set left margin value

Default value: "0"

Sets the left margin that is used for margins and rect2p cropping methods, in pixels.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:margins left:10

top: Set top margin value

Default value: "0"

Sets the top margin that is used for margins and rect2p cropping methods, in pixels.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:margins top:15

right: Set right margin value

Default value: "0"

Sets the right margin that is used for margins and rect2p cropping methods, in pixels.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:margins right:10

bottom: Set bottom margin value

Default value: "0"

Sets the bottom margin that is used for margins and rect2p cropping methods, in pixels.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:margins bottom:15

width: Set width of cropping rectangle for rect_pwh method

Default value: "0"

Sets the crop width for rect_pwh cropping method, in pixels.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:rect_pwh width:300 height:300

height: Set height of cropping rectangle for rect_pwh method

Default value: "0"

Sets the crop height for rect_pwh cropping method, in pixels.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:rect_pwh width:200 height:200

color: Set color sample for autocrop method

Default value: "r:255,g:255,b:255,a:255"

Applies color code for the autocrop method using RGBA color model – "r:(0-255),g:(0-255),b:(0-255);a:(0-255)".

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:rect_pwh width:200 height:200

tolerance: Set tolerance value for autocrop method

Default value: "0"

Applies tolerance value for autocrop method (0-100%). Tolerance parameter specifies the allowed deviation from the color sample specified in the previous color parameter.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper crop method:autocrop tolerance:50

-oper mirror

flip: Define the direction of image mirror flipping

Values:
vertically (default value), horizontally, both

Flips the output image in a selected direction. Available values: vertically, horizontally, or both ways – horizontally and vertically at the same time.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper mirror flip:horizontally

-oper rotate

angle: Define the angle of image rotation

Values:
0 (default value), 0-360

Rotates the output image to a certain degree (0-360°). The rotation is counterclockwise by default.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper rotate angle:45

direction: Select the direction of image rotation: CW or CWW

Values:
ccw (default value), cw

Sets direction for image rotation (clockwise or counterclockwise).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper rotate angle:45 direction:cw

color: Set background color for image rotation

Values:
ccw (default value), cw

Applies background color around the rotated image (using the RGB color model).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper rotate angle:45 color:"r:0,g:128,b:0,a:255"

-oper grayscale

You can select the grayscale mode for output TIFFs by using -oper grayscale.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper grayscale

-oper sharpen

radius: Сontrol the size of the sharpening area for sharpen filter

Values:
5 (default value), 0-250

Controls the width of the sharpening lines, in pixels.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper sharpen radius:3

amount: Control how much the contrast should be increased for adjacent pixels

Values:
100 (default value), 1-500

Sets the number of pixels for the sharpen filter. Amount controls how strong you want the sharpening to be.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper sharpen radius:3 amount:250

threshold: Control the minimum brightness change that will be sharpened

Values:
3 (default value), 0-255

Controls the balance between detail and noise. Threshold can be used to sharpen more pronounced edges while leaving subtler edges untouched.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper sharpen radius:3 amount:250 threshold:3

-oper brightness

percent: Adjust brightness correction

Values:
10 (default value), -100...100

Controls the level of brightness of output images, in percent.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper brightness percent:-10

-oper contrast

percent: Adjust image contrast correction

Values:
0 (default value), -100...100

Controls the contrast of output images, in percent.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper contrast percent:10

auto: Adjust image contrast automatically

Values:
yes (default value), no

Applies auto contrast adjustment.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper contrast auto:yes

-oper gamma

percent: Adjust image gamma correction

Values:
0 (default value), -100...100

Controls the contrast of output images, in percent.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper contrast percent:10

-oper smoothingnoise

You can use the Smoothing Noise operation to apply noise reduction for output TIFFs via -oper smoothingnoise.

Example:

2tiff.exe -src "C:\in\*.*" -dst "C:\out" -oper smoothingnoise

-oper autolevels

You can use the Auto Levels operation to correct the tonal range and color balance for output TIFFs via -oper autolevels.

Example:

2tiff.exe -src "C:\in\*.*" -dst "C:\out" -oper autolevels

-oper autorotate

orientation: Auto-rotate images to portrait or landscape

Values:
portrait (default value), landscape

Automatically rotates images to portrait or landscape orientation.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper autorotate orientation:landscape

direction: Set direction of image auto-rotation: CCW or CW

Values:
ccw (default value), cw

Sets direction for image rotation (clockwise or counterclockwise).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper autorotate orientation:landscape direction:cw

-oper paint

cmd: Draw a rectangle on the output image in the form of an outline or filled with color

Values:
fillrect, drawrect

Adds a rectangle on the image. To choose between an outline or filling with color, use painter commands: drawrect, fillrect

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper paint cmd:drawrect rect:"0 0 100 200" pen_color:"r:255,g:0,b:0,a:255" pen_width:1

rect: Set rectangle position

Default value: "0 0 -1 -1"

Sets the rectangle position on the output image file in the "x0 y0 width height" format, where:

  • x0 – shifts the page position horizontally from the top left corner (0.01 inch);
  • y0 – shifts the page position vertically from the top left corner (0.01 inch);
  • -1, -1 – are the original file's width and height calculated automatically (defaults).

You can keep the default value "0 0 -1 -1" to add a rectangular outline to the TIFF image(s).

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper paint cmd:drawrect rect:"0 0 -1 -1" pen_color:"r:255,g:0,b:0,a:255" pen_width:3

pen_color: Select pen color (outline color)

Default value: "r:0,g:0,b:0,a:255"

Adjusts the outline color of a rectangle. Enter values using the RGBA color model.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper paint cmd:drawrect rect:"0 0 100 200" pen_color:"r:255,g:0,b:0,a:255" pen_width:3

brush_color: Select brush color (fill color)

Default value: "r:255,g:255,b:255,a:255"

Adjusts the fill color of a rectangle. Enter values using the RGBA color model.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper paint cmd:drawrect rect:"0 0 100 200" brush_color:"r:255,g:0,b:0,a:255" pen_width:1

pen_width: Set thickness of rectangle's frames

Default value: 1

Controls the thickness of the rectangle's frames.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper paint cmd:drawrect rect:"0 0 100 200" pen_color:"r:255,g:0,b:0,a:255" pen_width:3

units: Select units for drawing a rectangle

Values:
pixels (default value), percents

Uses pixels or percents as units for -oper paint operation.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -oper paint cmd:drawrect rect:"20 20 20 20" pen_color:"r:255,g:0,b:0,a:255" pen_width:3

Post-processing action (-postproc)

Using the -postproc switch, you can control what should be done with the original files automatically after processing: do nothing, move or copy to another location, or delete.

passed: Select action for successfully converted source files

Values:
none (default value), copy, move, delete

Selects the action to be performed with successfully processed source files: do nothing, copy/move to another folder, or delete.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -postproc passed:delete

passed_dir: Set path to the destination folder for copy/move action, for converted source files

Specifies a folder where successfully converted source files should be moved or copied.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -postproc passed:copy passed_dir:"C:\Converted"

failed: Select action for source files that failed to convert

Values:
none (default value), copy, move, delete

Selects the action to be performed with source files that were not converted for some reason.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -postproc failed:move failed_dir:"C:\Unable to convert"

failed_dir: Set path to the destination folder for copy/move action, for failed source files

Specifies a folder where failed source files should be moved or copied.

Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -postproc failed:move failed_dir:"C:\Unable to convert"

output: Select action for output TIFF files: keep or delete

Values:
keep (default value), delete, delete_all

Selects an action to be performed with output files. You can use values:

  • keep – to keep all output files;
  • delete – to remove only failed files;
  • delete_all – to delete all files if at least one was unable to convert.
Example:

2tiff.exe -src "C:\In\*.*" -dst "C:\Out" -postproc output:delete

Information (-info)

pagecount: Get the number of pages of a file as executable's exit code

Generates a code with the number of pages contained in a single file as executable's exit code. For example, Page count=5.

Example:

2tiff.exe -src "C:\In\Text.pdf" -info pagecount

Advanced settings

Some advanced settings are available in the 2TIFF low-level settings editor. With it, you can adjust the default settings of 2TIFF. To access it, run this command:

2tiff.exe -ini

Use it with caution! Changing these settings may affect the program's performance or make things unexpected. Please change them if you are sure of what you are doing. If you are not sure, please contact our support for assistance.

2TIFF low-level settings editor

Thanks to the command line syntax, 2TIFF is very adaptive to your needs, making the image conversion and processing fast and efficient regardless of the number of processed files. Combine or modify the command line switches, parameters, and values mentioned above like you wish – they don’t require strict order. If you have any difficulty creating commands for 2TIFF, please ask us!

CONTACT US