Control Character

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sympaDOS
Posts: 1
Joined: 08 Mar 2014 08:36

Control Character

#1 Post by sympaDOS » 08 Mar 2014 09:59

hello,
How can I send the control BOLD character to the printer from the command line.
ex: echo character string > prn
And it prints in bold

Thank you for reading my message.
Thank you very much for your help.

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Control Character

#2 Post by penpen » 08 Mar 2014 15:33

Best idea i had was (remembering):

Code: Select all

@echo off
@echo off
set "text=^<html^>^<body^>^<b^>Some bold text.^</b^>^</body^>^</html^>"
set "file=test.html"
> "%file%" echo %text%
"%ComSPec%\..\rundll32.exe" "C:\WINDOWS\system32\mshtml.dll",PrintHTML "%file%"
del "%file%"
But this only opens the print dialog, and you need a temporary file (test.html in this case should not be in use).

penpen

Edit: Corrected some flaws.

Post Reply