Lprinting printer control codes?
#7
(08-03-2022, 11:18 PM)arnoldhf Wrote:
(08-03-2022, 10:53 PM)Pete Wrote: 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 _PUTIMAGE 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

I will see if that is a feasible option. The QBasic modules I am converting probably comprise over 100,000 lines of code with thousandsĀ of Lprints. Just to be sure are you saying the Wordpad file will contain the control codes being sent to the printer?

A

>Just to be sure are you saying the Wordpad file will contain the control codes being sent to the printer?

No. .rtf formatting in wordpad controls the printer output. You cannot use the escape codes from your program.

Example:

{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset0 Arial Black;}}
{\*\generator Riched20 10.0.19041}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22\lang9 Test line in Calibri 11 pt font.\par
\b\f1\fs36 Test line in Arial Black in 18pt font.\b0\f0\fs22\par
}



[Image: rtf.png]

Pete
Reply


Messages In This Thread
Lprinting printer control codes? - by arnoldhf - 08-03-2022, 08:03 PM
RE: Lprinting printer control codes? - by Pete - 08-03-2022, 10:53 PM
RE: Lprinting printer control codes? - by Pete - 08-03-2022, 11:52 PM
RE: Lprinting printer control codes? - by Pete - 08-04-2022, 12:06 AM
RE: Lprinting printer control codes? - by Pete - 08-04-2022, 12:39 AM
RE: Lprinting printer control codes? - by Pete - 08-04-2022, 02:34 AM



Users browsing this thread: 3 Guest(s)