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. How to print Page using PJL in C#

How to print Page using PJL in C#

Scheduled Pinned Locked Moved C#
csharptutorial
1 Posts 1 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.
  • R Offline
    R Offline
    Rajesh_K_Sharma
    wrote on last edited by
    #1

    How to print demo page using PJL in C#. I have code for print, but I don’t how to execute in c#. I have followed step Like private void ConnectToPrinter(string IPAddress, int Port) { //Loads the printer's IP address and port ipEndPoint = new IPEndPoint(Dns.GetHostEntry(IPAddress).AddressList[0], Port); //Creates a new socket to connect to the printer. (Streams data through TCP) socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); socket.Connect(ipEndPoint); } o Connect To Printer ( IP, Port) o strCommand = String.Format("\x1B%-12345X@PJL EXECUTE DEMOPAGE \r\n\x1B%-12345X\r\n"); ; //Sends the request to the printer. byte[] sendData; sendData = Encoding.ASCII.GetBytes(strCommand); int result = 0; result = socket.Send(sendData, sendData.Length, 0); I don’t know , where I made a mistak. Please tell me how to execute PJL Command in C# Regards Rajesh

    rajesh

    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