Send Postscript Document to Printer using VC++
I have a postscript file. How can I send it to a printer using Visual C++? This seems like it should be simple. If the printer supports PostScript directly you can spool a raw print jobs like this: HANDLE ph; OpenPrinter(&ph, "Printer Name", NULL); di1.pDatatype = IsV4Driver("Printer Name") ? "XPS_PASS" : "RAW"; di1.pDocName = "Raw print document"; di1.pOutputFile = NULL; StartDocPrinter(ph, 1, (LPBYTE)&di1); StartPagePrinter(ph); WritePrinter(ph, buffer, dwRead, &dwWritten); EndPagePrinter(ph); EndDocPrinter(ph) Repeat the WritePrinter until you have spooled the whole file. IsV4Driver()