Jump to content

How to format and print out a lot of strings


ioripalm
 Share

Recommended Posts

How a lot of string formatted output to a printer?

E.g:

1) The first line of Arial font and size 20 and Bold

2) The second line to the fourth line of  Tahoma font and size 14

3) Insert two blank lines every 5 row

4) Every 64 rows to add a page break (chr(12) ) and add headers and footers

5) Finally, the formatted string output to a printer(Dot matrix printer)

How to do that?The printer supports ESC / P,  ESC / P2,  ESC / PK, ESC / PK2,  Epson Standard Code for Printer.

Thank you very much!!!

 

Link to comment
Share on other sites

Use a GUI then use RichEdit there you may could make this with different Fonts~ Then u may could add the string within a Array which would be in the end written to the RichEdit. Then you could stream it to a file which is a .rtf and this can be printed in the end ;3

 

Edited by RaiNote
  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Link to comment
Share on other sites

ioripalm,

You can format your lines and send directly to print.  A search of "rtf print" turned up several examples including this.

Formatting your print will involve reading a source (file, probably), formatting each line according to your requirements and outputting the line to a printer or file.

See what you can put together and come back for help, if needed.

Good Luck,

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...