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. C#
  4. Generic / Text Only print

Generic / Text Only print

Scheduled Pinned Locked Moved C#
hardwarequestion
5 Posts 3 Posters 0 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.
  • M Offline
    M Offline
    MadsJ
    wrote on last edited by
    #1

    Hi We would like to be able to use the different hardware fonts that exists on most printers, when we use the windows driver "Generic / Text Only" *. We have written some code that enables us to write text to a "Generic / Text Only" (GTO) printer, but despite many attempts we haven't been able to change the font. For writing text we use the importer legacy function WritePrinter(). Any ideas? *) We have to use this driver since we also want to use our code for POS printers etc. Mads

    I 1 Reply Last reply
    0
    • M MadsJ

      Hi We would like to be able to use the different hardware fonts that exists on most printers, when we use the windows driver "Generic / Text Only" *. We have written some code that enables us to write text to a "Generic / Text Only" (GTO) printer, but despite many attempts we haven't been able to change the font. For writing text we use the importer legacy function WritePrinter(). Any ideas? *) We have to use this driver since we also want to use our code for POS printers etc. Mads

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      use the printing events. I cant remember the name but an event rises before it starts a print. you can then query for the selected fonts like a font-family in html

      M 1 Reply Last reply
      0
      • I Ista

        use the printing events. I cant remember the name but an event rises before it starts a print. you can then query for the selected fonts like a font-family in html

        M Offline
        M Offline
        MadsJ
        wrote on last edited by
        #3

        Since .NET print any stuff as graphics, the standard .NET printing mechanism doesn't work with a "generic / text only" printer. Having tried it anyway, we found out that it didn't raise the event (and the code was ok - the event was raised if we choose any other printer). Personally, I think we have to use some escape sequences - but I haven't been able to find out how to write them. Thanks for your reply. Mads

        J I 2 Replies Last reply
        0
        • M MadsJ

          Since .NET print any stuff as graphics, the standard .NET printing mechanism doesn't work with a "generic / text only" printer. Having tried it anyway, we found out that it didn't raise the event (and the code was ok - the event was raised if we choose any other printer). Personally, I think we have to use some escape sequences - but I haven't been able to find out how to write them. Thanks for your reply. Mads

          J Offline
          J Offline
          J Dunlap
          wrote on last edited by
          #4

          Perhaps you'll have to use the Windows printer API.

          "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
          "You must be the change you wish to see in the world." - Mahatma Gandhi

          1 Reply Last reply
          0
          • M MadsJ

            Since .NET print any stuff as graphics, the standard .NET printing mechanism doesn't work with a "generic / text only" printer. Having tried it anyway, we found out that it didn't raise the event (and the code was ok - the event was raised if we choose any other printer). Personally, I think we have to use some escape sequences - but I haven't been able to find out how to write them. Thanks for your reply. Mads

            I Offline
            I Offline
            Ista
            wrote on last edited by
            #5

            Have you tried crystal reports. I had the same issue with off brand printers. Crystal prints as graphics yes but it can be switched to character printing

            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