08-03-2022, 10:53 PM
(This post was last modified: 08-04-2022, 03:49 PM by Pete.
Edit Reason: Swap _PRINTIMAGE for _PUTIMAGE.
)
I miss not having those printer escape codes, too. I used theme a lot to adjust the printer page for forms. You could move half spaces, move back, it was great!
As far as changing fonts, either _PRINTIMAGE as described, which is a lot of work, or slaving out your program to Wordpad, if you are on Windows. I just use an .rtf template that I create, take my program data and merge it into that template as a temp file, and then SHELL to Wordpad to print that file. Using .rtf format, you can chose and changes fonts, font size, margins, etc.
You can simply write something the way you want it to look in Wordpad, save it, and then open it in Notepad, which will show you the .rtf formatting. That's a quick and dirty way to make a template.
Then just SHELL _dontwait "START /min /p wordpad myfile.rtf"
Where myfile.rtf is the .rtf file you made and want to print, START /min starts wordpad in the task bar, and /p prints the doc.
Pete
As far as changing fonts, either _PRINTIMAGE as described, which is a lot of work, or slaving out your program to Wordpad, if you are on Windows. I just use an .rtf template that I create, take my program data and merge it into that template as a temp file, and then SHELL to Wordpad to print that file. Using .rtf format, you can chose and changes fonts, font size, margins, etc.
You can simply write something the way you want it to look in Wordpad, save it, and then open it in Notepad, which will show you the .rtf formatting. That's a quick and dirty way to make a template.
Then just SHELL _dontwait "START /min /p wordpad myfile.rtf"
Where myfile.rtf is the .rtf file you made and want to print, START /min starts wordpad in the task bar, and /p prints the doc.
Pete
If eggs are brain food, Biden takes his scrambled.