Direct Print to Dotmatrix with special forms control

I need to print a special form size (7" in length) on a dotmatix printer.  I would like to be able to send control characters and text directly to the printer.  How can I best do this?
dlwallacAsked:
Who is Participating?
 
gikamConnect With a Mentor Commented:
MikeP is right
dabellei, if the printer is EPSON compatible then it shoud respect the stadard ESC/P control codes.
0
 
MikeP090797Commented:
You can open the printer's port using Open, just as you would open file:

Open "LPT1" for output as #1

'Then, you just use Print # to send strings to it
0
 
dabelleiCommented:
Each printer have their own code, do you have them?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
dlwallacAuthor Commented:
If this is what you are suggesting, it does not work.

Private Sub Command1_Click()
' Truck Bill Form Description
' Form size: 8.5 in. width, 7 in. height
' 8 lpi, 56 lines per page
' 10 characters per inch
' Using IBM ProPrinter (or any IBM control character compatible)

   Dim fa As Integer
   Dim x As Integer
   
   fa = FreeFile
   Open "lpt1" For Output As fa
   
   ' Set page size to 56 lines, 8 lines per inch
   Print #fa, Chr$(27); "C"; Chr$(56); Chr$(27); Chr$(48);
   
   For y = 1 To 2                       ' print 2 pages
      For x = 1 To 30                   ' print first 30 lines
         Print #fa, Format$(x, "##0")
      Next x
      Print #fa, Chr$(12);              ' eject to new page
   Next y
   
   Close fa
End Sub



0
 
gikamCommented:
Before I analize the code, tell me whats the concrete problem, what is wrong?. Any error messages, or what?
IBM is different from EPSON!
0
 
gikamCommented:
thanx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.