can we redirect output of a batch file to a pdf file
-
16-04-2021 - |
Вопрос
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.
Решение
I found this one which I can use in the batch script
Другие советы
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"
Не связан с StackOverflow