Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Printing in color to a printer
#21
Quote:I need to know if anyone knows how to print to a color printer in color from qb. Preferably(sp?) in text mode.The program needs to be small as I will be adding it to some of my other programs.
I know that there are Dos interupts for this, but I can't seem to recall what they are....
Getting back to the origian issue....
1) First of all, the text would best be in text mode. With a lot of extra work, you could print graphics, but that will complicate your program.

2) The post by Antoni, about escape sequences, is the only way that I know that you can print text in colors. There are no so-called "DOS interrupts" to do this for you.

3) I have a HP Laserjet 4 manual which includes a full set of escape sequences. However, this particular HP printer does not print colors. The closest thing to colors are "shades of gray" for which this manual has a bunch of options. If you're using an HP printer, and shades of gray seems ok, then let me know and I'll send you the corresponding escape sequences.

4) Another alternative, depending on how often you need to run these text producing programs, is to output the text to a flat file (text file). Then import the text file into MS-Word and color the text to your heart's content, and also maybe select different fonts. Then print it out on the color printer. This means a little extra manual intervention, but the results will be real pleasing.

5) Also, if you're real handy with Excel, you could set up an Excel spreadsheet with some macros which would input your text file, color it, and print it out. You would probably need to "flag" the text lines in some manner to tell Excel what colors you want. I'm not good at Excel, but have seen guys do similar things.

In any event, good luck! You have chosen a sticky problem.
*****
Reply
#22
Quote:32 Mb ram? :rotfl:

Try running ModPlug, AOL, Opera, QBasic, and FTP Explorer all at the same time... with 16 megs Tongue (and 14.4 modem)
Reply
#23
Oh the beauty of virtual memory Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#24
Quote:4) Another alternative, depending on how often you need to run these text producing programs, is to output the text to a flat file (text file). Then import the text file into MS-Word and color the text to your heart's content, and also maybe select different fonts. Then print it out on the color printer. This means a little extra manual intervention, but the results will be real pleasing.

Just an idea: RTF is supposed to be an easy format. A solution would be outputting to a file integrating RTF color change tags, then Windows Write would be enough to print it..You could also do a HTTP file...
An example of rtf
Code:
{\rtf1\ansi\
\deff0
{\colortbl;\red0\green0\blue0;
\red255\green0\blue0;
\red0\green255\blue0;
\red0\green0\blue255;}
{Black text\par }
{\cf3Green text\par }
{\cf2 Red text\par }
{\cf4 Blue text\par }
{\cf0 Black text again\par}}
Antoni
Reply
#25
Quote:
TheBigBasicQ Wrote:32 Mb ram? :rotfl:

Try running ModPlug, AOL, Opera, QBasic, and FTP Explorer all at the same time... with 16 megs Tongue (and 14.4 modem)

Acutally sometime ago when this comp was not working. I was using my old PI 166 MMX with 32Mb ram and WinME with a 56K modem. And everything worked fine. You really must know how to tweak you machine =).

BTW I think neks great at tweaking his machine =P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)