Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. Print on Thermal Printing

Print on Thermal Printing

Scheduled Pinned Locked Moved Windows Forms
helptutorialquestion
6 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    All Time Programming
    wrote on last edited by
    #1

    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,

    D 1 Reply Last reply
    0
    • A All Time Programming

      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,

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      A 1 Reply Last reply
      0
      • D 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 Kreskowiak

        A Offline
        A Offline
        All Time Programming
        wrote on last edited by
        #3

        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,

        D G 3 Replies Last reply
        0
        • A All Time Programming

          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,

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • A All Time Programming

            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,

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • A All Time Programming

              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,

              G Offline
              G Offline
              Goutam Patra
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups