Please enable JavaScript to view this site.

Navigation: Developer Information > Command Line Interface

Command Line Batch Convert

Scroll Prev Top Next More

Batch Convert Command Line Format Win2PDF Pro Only Feature

 

win2pdfd.exe batchconvert "sourcefolder" "destfolder" destformat

win2pdfd.exe batchconvert "sourcefolder" "destfile.pdf" destformat savetype

win2pdfd.exe batchconvert "sourcefolder" "destfile.pdf" destformat savetype includesubfolders

 

Converts all compatible files in the sourcefolder to the specified format, and saves the converted files using the same base filename to the destination folder. If the optional "savetype" parameter is specified (PDF formats only), the files are merged into a single file specified by "destfile.pdf". The compatible file formats in the "sourcefolder" can be one of:

 

Extension

Format

.PDF

Portable Document Format

.DOCX, .DOC

Microsoft Word

.RTF

Rich Text Format

.ODT

OpenDocument Text

.TXT

Text

.HTML, .HTM, .MHTML, .JS

HyperText Markup Language

.SVG

Scalable Vector Graphics

.XPS

XML Paper Specification

.TIF, .TIFF

Tagged Image File Format

.JPG, .JPEG, .JPE

Joint Photographic Experts Group Image

.PNG

Portable Network Graphics

.BMP, .DIB

Windows Bitmap

.GIF

Graphics Interchange Format

 

Files not matching one of these extensions will be skipped.

 

The "destformat" can be one of the following:

 

destformat parameter

Description

pdf

Portable Document Format

pdfimagemono

PDF Image Only - monochrome

pdfimagegrayscale

PDF Image Only - grayscale

pdfimagecolor

PDF Image Only - color

pdfaimagemono

PDF/A Image Only - monochrome

pdfaimagegrayscale

PDF/A Image Only - grayscale

pdfaimagecolor

PDF/A Image Only - color

pdfcompressed

PDF - compressed

pdfsearchable

PDF - searchable (OCR)

docx

DOCX - Microsoft Word

rtf

RTF - Rich Text Format

odt

ODT - OpenDocument Text

textformatted

Text - formatted

textunformatted

Text - unformatted

jpggray

JPG - grayscale

jpg

JPG - color

tiffmono

TIFF - monochrome

tiffgray

TIFF - grayscale

tiff

TIFF - color

tifftransparent

TIFF - color with transparent background

pnggray

PNG - Grayscale

png

PNG - Color

pnggraytransparent

PNG - Grayscale with transparent background

pngtransparent

PNG - Color with transparent background

ocrtextformatted

Text - formatted after making searchable, requires optional Win2PDF OCR Add-on

ocrtextunformatted

Text - unformatted after making searchable, formatted after making searchable, requires optional Win2PDF OCR Add-on

 

The optional "savetype" can be specified when the "destformat" is a PDF (pdf, pdfimagemono, pdfimagegrayscale, pdfimagecolor, pdfcompressed, pdfsearchable), and can be one of the following:

 

savetype parameter

Description

individual

Each file is converted to a separate file named based in the source file.

alphanumeric

Files are converted and then merged to a single PDF sorted alphabetically by the source file name.

reversealphanumeric

Files are converted and then merged to a single PDF sorted reverse alphabetically by the source file name.

modifieddatetime

Files are converted and then merged to a single PDF sorted reverse chronologically by the modified date of the source file name (oldest first).

reversedmodifieddatetime

Files are converted and then merged to a single PDF sorted chronologically by the modified date of the source file name (newest first).

createddatetime

Files are converted and then merged to a single PDF sorted reverse chronologically by the creation date of the source file name (oldest first).

reversecreateddatetime

Files are converted and then merged to a single PDF sorted chronologically by the creation date of the source file name (newest first).

 

If the "savetype" is not specified, the "individual" option is used.

 

If the optional "includesubfolders" is specified and set to 1, the current folder and all subfolders will be converted. The directory structure is mirrored in the "destfolder".

 

Any folder names that contain spaces must be enclosed with quotation marks.

 

This feature requires a licensed version of Win2PDF Pro. Contact us for a time limited evaluation license.

 

Returns 0 on success, and a Windows system error code on failure.