Please enable JavaScript to view this site.

Navigation: Developer Information > Command Line Interface

Command Line File Print

Scroll Prev Top Next More

Print File Command Line Format

 

win2pdfd.exe print "sourcefile" "printername"

win2pdfd.exe print "sourcefile" "printername" startpage endpage

win2pdfd.exe print "sourcefile" "printername" trayname

 

Prints the file “sourcefile” to the specified printername, optionally including a startpage and endpage, or tray name. The "sourcefile" can be in any of the following formats:

 

Extension

Format

.PDF

Portable Document Format

.DOCX, .DOC

Microsoft Word (Win2PDF Pro Only)

.RTF

Rich Text Format (Win2PDF Pro Only)

.ODT

OpenDocument Text (Win2PDF Pro Only)

.TXT

Text (Win2PDF Pro Only)

.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

 

Any file or printer names that contain spaces must be enclosed with quotation marks. The "sourcefile" can be a local file path, or an web address (URL) to an existing PDF.

 

If the "trayname" is specified, it must match one of the existing tray names for the printer ("Tray 1", "Upper", "Lower", "Manual", etc.). If the tray name contains spaces, it must be enclosed with quotation marks. If the specified tray is not available for the printer, the available tray names are printed on the command line console.

 

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