Want to print a PDF document directly to the printer(asp.net), client has given host address and port and printer name and they are using printer server with same IP and port number for all the printer configured with that server. We want to give print directly to the printer pointed by client(name specific)...Kindly help
My code,
`Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
clientSocket.NoDelay = true;
IPAddress ip = IPAddress.Parse(hostAddress);
IPEndPoint ipep = new IPEndPoint(ip, Convert.ToInt32(PortNumber));
clientSocket.Connect(ipep);
clientSocket.Send(fileBytes);
clientSocket.Close();
MessageBox.Show("Printed Successfully");`
Aucun commentaire:
Enregistrer un commentaire