I wanna make a copy of the document that I sent to print, but I don't know the full path of the document,
Is there a way to print the same document in to printers at the same time
I wanna print at the same time in Microsoft Print to PDF, to make a copy of the PrintSystemInfoJob that is printing
I'm using C#

Abhishek YadavRank #217 · 11.3K reputationPosted Aug 1, 2024, 6:39 AM EDT
Yes, you can print the same document to two printers simultaneously using C#. To achieve this, you’ll need to print the document to both printers using their respective print queues. Here’s a step-by-step guide on how you might accomplish this:
Set Up the Print Document: First, create a
PrintDocumentobject in C# that represents the document you want to print.Define the Print Jobs: Create two separate
PrintDocumentobjects or configure the samePrintDocumentobject to use differentPrintQueueobjects.Print to Multiple Printers: Print the document to both printers by invoking the
Printmethod on eachPrintDocumentobject.Here's a sample code snippet to illustrate how you might implement this:
using System; using System.Drawing.Printing; using System.Windows.Forms; public class PrintHelper { public void PrintToMultiplePrinters(string printerName1, string printerName2) { // Create the PrintDocument object PrintDocument printDoc = new PrintDocument(); // Set the PrintDocument's PrintPage event handler printDoc.PrintPage += new PrintPageEventHandler(PrintPageHandler); // Set up the printers PrinterSettings printerSettings1 = new PrinterSettings { PrinterName = printerName1 }; PrinterSettings printerSettings2 = new PrinterSettings { PrinterName = printerName2 }; // Print to the first printer printDoc.PrinterSettings = printerSettings1; printDoc.Print(); // Print to the second printer printDoc.PrinterSettings = printerSettings2; printDoc.Print(); } private void PrintPageHandler(object sender, PrintPageEventArgs e) { // Here you would add code to draw the content you want to print e.Graphics.DrawString("Hello, world!", new Font("Arial", 12), Brushes.Black, new PointF(100, 100)); } }Jorge Carlos Iglesias Alvarez108 reputationPosted Aug 1, 2024, 1:46 PM EDT
Thank You so much for your answer
I'm getting the Print Job properties witch Win32_PrintJob
Then I use the ID value in the class SystemPrintInfoJob to ask for JobStream , but the value is always null
I wanna use that value to but later use send to Print
You know why that happens
Why that value is always null ??
Thank you