I am trying to print information on blank checks. I am having trouble printing the MIRC Encoding font.
this is taken from printing_example 0.1.0
Public Sub PrinterOne_Draw()
Paint.Font = Font["MIRC Encodeing,12"]
Paint.DrawText(TextArea1.Text, 10, 10)
End
and it is giving me trouble .... I am new still learning Gambas
Printing to printer with MIRC Encoding font
- grayghost4
- Posts: 174
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
- grayghost4
- Posts: 174
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
Re: Printing to printer with MIRC Encoding font
by changing to this :
Paint.Font = Font["MICR Encoding,+10"]
it Kinda works .... not the first time ... but it works the second time I print it ???
Paint.Font = Font["MICR Encoding,+10"]
it Kinda works .... not the first time ... but it works the second time I print it ???
- grayghost4
- Posts: 174
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
Re: Printing to printer with MIRC Encoding font need HELP
I finaley got it to print to screen ... but when I select the printer, I get a message
Printer is not printing in Main: 21
If I select Print Preview and then select print from the preview it will print on the Printer
I also need the command to force a Page break to print second and third, etc. ,,,,Pages
Any help would be appreciated
Public Sub Prn1_Draw()
Dim ix, iCkNumber, ibankroute, iaccountNumber, iStartCkNum As Integer
Dim mircnumber As String
iCkNumber = 25508
Paint.End
Paint.Begin(Prn1)
For ix = 0 To 400 Step 200
Paint.Font = Font["Aeral,12,bold"]
Paint.DrawRichText(iCkNumber, 480, 25 + ix)
Inc iCkNumber
Paint.Font = Font["Aeral,9"]
Paint.DrawrichText("<b>John Doe JR.</b><br> 1234 Main Sr. <br>Hometown Il 66152", 210, 35 + ix)
Paint.DrawrichText("<u>Date______________________ </u>", 390, 65 + ix)
Paint.DrawrichText("<small>Pay to the<br><u>order of:</u></small><u>_______________________________________________________________|</u>", 190, 80 + ix)
Paint.DrawrichText("<h3>$<u>________________</u></h3> ", 472, 88 + ix)
Paint.DrawrichText("<u>______________________________________________________________________________<small>Dollars</small></u>", 190, 120 + ix)
Paint.Font = Font["MICR Encoding,18"]
mircnumber = Str("a7200012345a c8543987c") & Str(iCkNumber)
Paint.DrawRichText(mircnumber, 197, 200 + ix)
Next
' need command to send page break to printer ???
Paint.End
End
Public Sub Button1_Click()
If Prn1.Configure() Then Return
Prn1_Draw
End
Printer is not printing in Main: 21
If I select Print Preview and then select print from the preview it will print on the Printer
I also need the command to force a Page break to print second and third, etc. ,,,,Pages
Any help would be appreciated
Public Sub Prn1_Draw()
Dim ix, iCkNumber, ibankroute, iaccountNumber, iStartCkNum As Integer
Dim mircnumber As String
iCkNumber = 25508
Paint.End
Paint.Begin(Prn1)
For ix = 0 To 400 Step 200
Paint.Font = Font["Aeral,12,bold"]
Paint.DrawRichText(iCkNumber, 480, 25 + ix)
Inc iCkNumber
Paint.Font = Font["Aeral,9"]
Paint.DrawrichText("<b>John Doe JR.</b><br> 1234 Main Sr. <br>Hometown Il 66152", 210, 35 + ix)
Paint.DrawrichText("<u>Date______________________ </u>", 390, 65 + ix)
Paint.DrawrichText("<small>Pay to the<br><u>order of:</u></small><u>_______________________________________________________________|</u>", 190, 80 + ix)
Paint.DrawrichText("<h3>$<u>________________</u></h3> ", 472, 88 + ix)
Paint.DrawrichText("<u>______________________________________________________________________________<small>Dollars</small></u>", 190, 120 + ix)
Paint.Font = Font["MICR Encoding,18"]
mircnumber = Str("a7200012345a c8543987c") & Str(iCkNumber)
Paint.DrawRichText(mircnumber, 197, 200 + ix)
Next
' need command to send page break to printer ???
Paint.End
End
Public Sub Button1_Click()
If Prn1.Configure() Then Return
Prn1_Draw
End
Re: Printing to printer with MIRC Encoding font
grayghost4 take a look at my simple file cabinet program in the project showcase. It has a printer access form in it. It may help you with what you need. If not I can provide you with an example program. I think the routine though in that program should help you out.
- grayghost4
- Posts: 174
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
Re: Printing to printer with MIRC Encoding font
where is the project showcase ?
is that the farm?
is that the farm?
Re: Printing to printer with MIRC Encoding font
Home > Board Index > Gambas Programming > General > Project Showcase
Or use this link: viewforum.php?f=13
- grayghost4
- Posts: 174
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
- grayghost4
- Posts: 174
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
Re: Printing to printer with MIRC Encoding font
from looking at the program it appears that I should put the entire print out that I want into one string and send it to the print sub .... if so how do I force a Page Break ? Or do I just put one page in at a time ?
Is there a text book or tutorial that covers printing to the printer ? I have been searching for such a thing.
I guess what I am looking for is how to Print "Hello world " to the printer
all the examples I find are to advanced for me to understand
Is there a text book or tutorial that covers printing to the printer ? I have been searching for such a thing.
I guess what I am looking for is how to Print "Hello world " to the printer
all the examples I find are to advanced for me to understand
Re: Printing to printer with MIRC Encoding font
grayghost here is a link that may help. Hope this helps with your problem. I have looked and have failed to find anything on MIRC encoding font using Gambas.
https://en.wikibooks.org/wiki/Programmi ... p/Printing
https://en.wikibooks.org/wiki/Programmi ... p/Printing