Printing to a Network printer RRS feed

  • Question

  • User360451555 posted


    Am trying to send bytes of a file to be printed to a Network located printer. The printer Led lamp blinks when i send the file though i get no pages printed out. Anything am doing wrong....you think?

    var ep = new IPEndPoint(IPAddress.Parse(""), 9100);
    using (var sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
        using (var ns = new NetworkStream(sock))
            await ns.WriteAsync(response, 0, response.Length, token);

    Thursday, January 10, 2019 7:02 PM


  • User-943250815 posted

    In past, I mean in DOS time, there was a trick, we had  to send a form-feed or eject to the printer, perhaps there is something missing at the end of your stream, so everything has been transmitted but printer is waiting for an action

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 10, 2019 8:04 PM