

If your preference is FireFox rendering, from the command line you needed to install an extension, however with tightened security in windows 10, I dont know if that's still possible. Traditionally you would simply use rundll32.exe mshtml.dll,PrintHTML "C:\printme.txt"īut security exploits have made that simplicity more of a challenge thusĬd /D C:\Windows\System32 & rundll32.exe mshtml.dll,PrintHTML "C:\printme.txt"Īnd Microsoft Current Policy is "User confirmation is needed to print an HTML page through MSHTML.DLL." thus you need to hit print using sendkeys. So the x problem is the files are not plain.txt they are plain.htm so need translation from html by graphic conversion (rendering) to pass through a printer language converter (printer driver) That's a totally different question but the answer is still much the same. Later you say you are sending html as text and want graphic output not textual. Several other file types can also be printed in a similar way such as graphics images, using mspaint. NotePad settings can be changed in the registry before and after you print, via the command line, even skewing letters (fun to prank colleagues if you use 1 degree off kilter), however you cannot set line spacing or add graphics, for those you need to step up to WordPad which will accept docx, rtf, odt and most simple text file types. Thus the simplest way to command line print plain text is NotePad /pt C:\printme.txt "POS80" So what is Windows 10 doing when you right click print? Generally it fires up the associated FTA (File Type Application) which for. To avoid the Save Output File As dialog when adding a print job to the default queue, ensure that your default printer isn't Microsoft XPS Document Writer, Microsoft Print to PDF, or other print-to-file options. Thus by far the simplest is make the printer the default one which is what you have. Now you could try messing with printer port redirections to get around that but it would likely mess up other application printing.
#PRINTME PRINTERS NEAR ME SERIAL#
which means its serial (old Com ports) whereas Line Printer (old LPT ports) were parallel hence the potential needs for fettling, but in windows you can use the port name for the printer and that resolves ports issue (files can become ports or vice versa) thus no real problem.

Print C:\printme.txt "POS80" However I expect you are getting the error message "Unable to initialize device PRN" that is not unusual as PRN was traditionally LPT1. It MAY work if you have a line printer set to LPT1 and worth trying Your mileage can vary using the legacy command Print
