Does anyone have experience with sending a byte array to a printer? I am sending a pdf file directly to a printer's IP address and it prints on some printers and blank pages on other printers. Is this a printer driver issue?. Here is the code that prints:

```
 public class PrintService : IPrintService
  {
    ManualResetEvent connectDone;
    ManualResetEvent sendDone;

    /// <inheritDoc />
    public void PrintData(byte[] data, string printerName)
    {
      connectDone = new ManualResetEvent(false);
      sendDone = new ManualResetEvent(false);
      IPAddress ip = IPAddress.Parse(printerName);
      IPEndPoint remoteEP = new IPEndPoint(ip, 9100);
      Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
      client.NoDelay = true;

      try
      {
        client.BeginConnect(remoteEP, new AsyncCallback(connectCallback), client);
        connectDone.WaitOne();
        client.BeginSend(data, 0, data.Length, 0, new AsyncCallback(sendCallback), client);
        sendDone.WaitOne();
      }
      finally
      {
        // Shutdown the client
        this.shutDown(client);
      }
    }

    private void connectCallback(IAsyncResult ar)
    {
      // Retrieve the socket from the state object.
      Socket client = (Socket)ar.AsyncState;

      // Complete the connection.
      client.EndConnect(ar);

      // Signal that the connection has been made.
      connectDone.Set();
    }
    private void sendCallback(IAsyncResult ar)
    {
      // Retrieve the socket from the state object.
      Socket client = (Socket)ar.AsyncState;

      // Complete sending the data to the remote device.
      int bytesSent = client.EndSend(ar);

      // Signal that all bytes have been sent.
      sendDone.Set();
    }
    private void shutDown(Socket client)
    {
      client.Shutdown(SocketShutdown.Both);
      client.Close();
    }
  }

```