[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Print alignment

Hi

I am trying to do a print routine directly to my printer.

Open "LPT1" as Output #1
Print #1, blah,blah,blah
Close #1

I am using ESC/POS character set to align my printout. However, I cannot find anything that allow me to do a tab to a specific position. I want to achieve something like

Printer.Print Tab(20); "Hello"

Something to that effect using ESC/POS.

Any help is appreciated.


0
leechoonhwee
Asked:
leechoonhwee
1 Solution
 
JohnYoungerCommented:
You can use CHR(9) as a tab.
However, if you really want to align precisely you need to use API calls.
Let me know if you need further advice.
Cheers
0
 
leechoonhweeAuthor Commented:
Thanks.....I found out that I can also use Tab(xx) in Print #1......
0
 
TiPiCommented:
The following code may also interrest you.

Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.Print "TopLeft"
Printer.CurrentX = Printer.ScaleWidth - Printer.TextWidth("BottomRight")
Printer.CurrentY = Printer.ScaleHeight - Printer.TextHeight("BottomRight")
Printer.Print "BottomRight"
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
CleanupPingCommented:
leechoonhwee:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
DanRollinsCommented:
leechoonhwee, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
0
 
Computer101Commented:
PAQed, with points refunded (25)

Computer101
E-E Admin
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now