can we redirect output of a batch file to a pdf file

965 views Asked by At

Is it possible to redirect the output of a batch file to a pdf file? I have a batch file that runs "ss diff" (source safe command to get the differences) on all the files in a project. Right now, it outputs the result to a text file. I was wondering if we can redirect the output to a text file. If not, is there a way to convert a text file to a pdf file automatically in a windows batch?

Thanks, Sridhar.

2

There are 2 answers

0
Sridhar On BEST ANSWER

I found this one which I can use in the batch script

http://www.verypdf.com/txt2pdf/index.htm#dl

0
Jeffery Hicks On

You could run your batch file in PowerShell and pipe to Out-Printer, assuming you have a PDF "printer" installed.

PS C:\work> .\test.bat | out-printer "CutePDF Writer"