win2pdfd.exe txt2pdf "source.txt" "dest.pdf"
win2pdfd.exe txt2pdf "source.txt" "dest.pdf" landscape
win2pdfd.exe formattedtxt2pdf "source.txt" "dest.pdf"
win2pdfd.exe formattedtxt2pdf "source.txt" "dest.pdf" papersize
win2pdfd.exe formattedtxt2pdf "source.txt" "dest.pdf" papersize textsize
win2pdfd.exe formattedtxt2pdf "source.txt" "dest.pdf" papersize textsize marginleft margintop marginright marginbottom
Convert the text file specified by "source.txt" to a PDF file named "dest.pdf". The "txt2pdf" command creates a PDF using the letter size paper, a variable width font, and 1" margins. The "formattedtxt2pdf" command uses a fixed width font and works better for reports that have columnar data and fixed width formatting.
If the "papersize" is specified, it can be one of:
letter |
letter-landscape |
legal |
legal-landscape |
tabloid |
tabloid-landscape |
A2 |
A2-landscape |
A3 |
A3-landscape |
A4 |
A4-landscape |
A5 |
A5-landscape |
CSheet |
CSheet-landscape |
DSheet |
DSheet-landscape |
ESheet |
ESheet-landscape |
The "-landscape" papersize variations change the orientation to landscape. If no papersize is specified, "letter" is used.
The optional "textsize", "marginleft", "margintop", "marginright", and "marginbottom" parameters are specified in points (1/72 inch). If no margin is specified, 1" margins are used.
Any file 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.
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.