Printing to printer with MIRC Encoding font

Post

Posted
Rating:
#1 (In Topic #355)
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
 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
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
 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 ???
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
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  :D  

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
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Regular
cage is in the usergroup ‘Regular’
 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.
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
 where is the project showcase ?
is that the farm?
Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Regular
stevedee is in the usergroup ‘Regular’

grayghost4 said

where is the project showcase ?

Home > Board Index > Gambas Programming > General > Project Showcase

Or use this link: https://forum.gambas.one/viewforum.php?f=13
Online now: No Back to the top

Post

Posted
Rating:
#7
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
Thanks  :D
Online now: No Back to the top

Post

Posted
Rating:
#8
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
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  ;)
Online now: No Back to the top

Post

Posted
Rating:
#9
Avatar
Regular
cage is in the usergroup ‘Regular’
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.o…_Gambas_from_Zip/Printing
Online now: No Back to the top
1 guest and 0 members have just viewed this.