ioripalm Posted September 7, 2015 Posted September 7, 2015 How a lot of string formatted output to a printer?E.g:1) The first line of Arial font and size 20 and Bold2) The second line to the fourth line of Tahoma font and size 143) Insert two blank lines every 5 row4) Every 64 rows to add a page break (chr(12) ) and add headers and footers5) 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!!!
RaiNote Posted September 7, 2015 Posted September 7, 2015 (edited) 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 September 7, 2015 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~
kylomas Posted September 7, 2015 Posted September 7, 2015 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
Skysnake Posted September 7, 2015 Posted September 7, 2015 I found pushing all the text into PDF is easier. Then the PDF is both portable and easy to print. See here:MLipok's Debenu PDF UDF Skysnake Why is the snake in the sky?
kylomas Posted September 7, 2015 Posted September 7, 2015 @Skysnake - Nice! I had forgotten about that UDF... 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now