Print on Thermal Printing
-
Hi, I have to print receipts on Thermal Printer. I found a example on net on http://www.taylorsnet.co.uk/Forums/ForumPosts.aspx?Subject=7[^] But am wondering about the 1st parameter 'A = Text and H-Location (A for text, B for Barcode) fileWriter.Write("A800, 20, 1, 3, 2, 2, N") ' 1st line .......... fileWriter.Write("A750, 20, 1, 3, 2, 2, N") ' 2nd line ......... A for Text is fine. but the H-Location is Y axis right - I assume as (B)V-location is same in both the line; so that should be X-axis. If H-location is y, axis then why it is decreasing i.e from 800, 750 .. Can anyone help me with this part. Is their anyway I can see the contents without printing - like saving the outFile or seeing in PrintPreview, etc. Any help or guidance is highly appreciated.
Thanks & Regards,
-
Hi, I have to print receipts on Thermal Printer. I found a example on net on http://www.taylorsnet.co.uk/Forums/ForumPosts.aspx?Subject=7[^] But am wondering about the 1st parameter 'A = Text and H-Location (A for text, B for Barcode) fileWriter.Write("A800, 20, 1, 3, 2, 2, N") ' 1st line .......... fileWriter.Write("A750, 20, 1, 3, 2, 2, N") ' 2nd line ......... A for Text is fine. but the H-Location is Y axis right - I assume as (B)V-location is same in both the line; so that should be X-axis. If H-location is y, axis then why it is decreasing i.e from 800, 750 .. Can anyone help me with this part. Is their anyway I can see the contents without printing - like saving the outFile or seeing in PrintPreview, etc. Any help or guidance is highly appreciated.
Thanks & Regards,
You're using what looks like a File writer already. Just change whatever is being open to a file instead of whatever you're opening for the printer. Then you can send everything to a file instead of the printer.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
You're using what looks like a File writer already. Just change whatever is being open to a file instead of whatever you're opening for the printer. Then you can send everything to a file instead of the printer.
A guide to posting questions on CodeProject[^]
Dave KreskowiakHi Dave, By just changing to a file, it will give results like : N A800, 20, 1, 3, 2, 2, N"Name" A750, 20, 1, 3, 2, 2, N"Address" P1 I wanted a way to see the results like we see in Print Preview. Our print lines include g.drawString..., but the resuts are different. That's what I was asking for Thermal Printer. To know the code kindly refer the link provided in main msg from where I have taken. Do you know anything about H-Location of this issue ?
Thanks & Regards,
-
Hi Dave, By just changing to a file, it will give results like : N A800, 20, 1, 3, 2, 2, N"Name" A750, 20, 1, 3, 2, 2, N"Address" P1 I wanted a way to see the results like we see in Print Preview. Our print lines include g.drawString..., but the resuts are different. That's what I was asking for Thermal Printer. To know the code kindly refer the link provided in main msg from where I have taken. Do you know anything about H-Location of this issue ?
Thanks & Regards,
The only way that's going to happen is if you write your own parser for the language the printer understands (implementing all the commands you have documentation for) and render the image in whatever window you want. There is no class in the .NET Framework that will do this for you. There is probably no 3rd party class that will do this either unless the printer you're using and the commands you send to it are one of the standard page description languages, like PostScript, PCL, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Hi Dave, By just changing to a file, it will give results like : N A800, 20, 1, 3, 2, 2, N"Name" A750, 20, 1, 3, 2, 2, N"Address" P1 I wanted a way to see the results like we see in Print Preview. Our print lines include g.drawString..., but the resuts are different. That's what I was asking for Thermal Printer. To know the code kindly refer the link provided in main msg from where I have taken. Do you know anything about H-Location of this issue ?
Thanks & Regards,
This code will only work if you're using a Zebra printer that understands these codes. It's not going to work for every thermal printer in existance. Your best source of information on the code you send to the printer is the documentation on your printer, not someone elses code.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Hi Dave, By just changing to a file, it will give results like : N A800, 20, 1, 3, 2, 2, N"Name" A750, 20, 1, 3, 2, 2, N"Address" P1 I wanted a way to see the results like we see in Print Preview. Our print lines include g.drawString..., but the resuts are different. That's what I was asking for Thermal Printer. To know the code kindly refer the link provided in main msg from where I have taken. Do you know anything about H-Location of this issue ?
Thanks & Regards,
As much as i can remember you have a Zebra designer software comes with zebra printer driver CD. You can design your barcode using that software and also you can export that in a text format(ie the way you are printing). also you have all documents (comes in a folder) how to print the barcode in that CD itself. I think reading those documents will help you.