Questions tagged [print-spooler-api]

The API to access and manipulate a print spooler

A print spooler is a software package in an operating system that provides queueing functionality to queue documents sent to the printer to print.

A print spooler API allows a programmer to manipulate the queue of documents to be printed (a.k.a the print spool).

88 questions
1
vote
0 answers

C# printing how to get copy count

I am trying to make a printing manangement server. I have 1 printer which is shared with 4 other people. try { string PrinterJobs = "SELECT * FROM Win32_PrintJob"; ManagementObjectSearcher FindPrintJobs = new…
D'Ums
  • 13
  • 4
1
vote
1 answer

Printing via Winspool

I'm trying to set up a kind of print service for a website to communicate with and send printable documents to (pdf, html, excel). I decided on Go. I created the simple program below. On some PCs it works (Windows 7) on other ones (Windows 8) it…
Leon
  • 841
  • 3
  • 10
  • 21
1
vote
1 answer

Can't get print job notification with status JOB_STATUS_DELETED

I want to get notification when print job has been completed or deleted. Now I see that notification mechanism provides the JOB_STATUS_DELETING, but no JOB_STATUS_DELETED status can be got. I found something similar Here, but it doesn't solve my…
DevOvercome
  • 151
  • 1
  • 12
1
vote
0 answers

Development using Virtual printers instead of real printers

I want to develop an application that communicates with print spooler. The application is on .Net platform. I want to have access to raw data of printed document but I want to use a virtual printer for this job. But I am unable to get the data from…
Aitizazk
  • 332
  • 1
  • 4
  • 16
1
vote
2 answers

Prevent User from Printing

I've created an application in .net to monitor jobs in the printer by using the DLL in the following reference : http://www.codeproject.com/Articles/51085/Monitor-jobs-in-a-printer-queue-NET?fid=1556859&select=4799234 my question is : how can i…
1
vote
1 answer

How to get pdf file from a word/doc/rtf file in c# or command line programmatically

I am trying to get pdf file from a word/doc/rtf file programmatically (C# or Command line). I am able to successfully print a word/rtf/doc file using print command in wordpad from command line: "write.exe /pt TextFileName PrinterName [ DriverName […
1
vote
1 answer

Send print to windows spooler with Epson Thermal printer

I have a POS application built on c# visual studio 2012. The POS solution is based on transaction of money from a consumer to the beneficiary. My POS solution gives a printout for every transaction occurred.I am using an EPSON TM-T81 thermal…
aml221
  • 23
  • 3
  • 7
1
vote
1 answer

AddJob + SetPrinter: is it possible to set dmCopies and get effect?

What I need is to re-print spooled file (not job*) again, setting a new amount of copies. So far following attempts were tried: OpenPrinter, AddJob, SetJob (with JOB_INFO_2->pDevMode) OpenPrinter, SetPrinter, DocumentProperties, AddJob,…
kagali-san
  • 2,964
  • 7
  • 48
  • 87
1
vote
1 answer

Win32 printing with js-ctypes fails with ERROR_INVALID_HANDLE

I am converting a binary component to js-ctypes and StartPagePrinter is giving me ERROR_INVALID_HANDLE. I'm printing using the standard Windows techniques. (Search for "MSDN WritePrinter" to see the basic steps.) I think I'm either using the wrong…
John Gotts
  • 21
  • 3
1
vote
2 answers

System.Printing skips a few job status states?

I am sending print jobs to the printer and I try to keep track of their status in order to reflect it in a queue of my own. It seems as if the print jobs never go through "Printed", "Completed" status. I made a small test program to see if maybe I…
shwartz
  • 631
  • 3
  • 13
  • 29
1
vote
2 answers

PrintServerException - "...name is invalid" even though I can access the path from windows

A line similar to the following threw the above exception: PrintServer ps = new PrintServer(@"\\prntsrv"); When I use "Run..." on Windows the address above does work and take me to the list of print jobs so why does the line of code not work?
shwartz
  • 631
  • 3
  • 13
  • 29
1
vote
1 answer

Print spooler job cancellation message or callback wanted

Backgroud: I'm now trying to print via GDI Print API, and it looks like this: StartDoc(hDC,&docinfo) foreach page in page_buf StartPage(hDC) /* write the page to printer DC */ EndPage(hDC) EndDoc(hDC) The Problem: During printing there…
starrify
  • 14,307
  • 5
  • 33
  • 50
0
votes
2 answers

Microsoft Print Spooler API - hold a print job?

Does anyone know if it is possible to hold a print job with help of Microsoft Print Spooler API? I would like to hold it before it is sent to the printer. Is this possible?
0
votes
1 answer

Print Spooler API - AddForm example

I am trying to make a AddForm function using C++ Windows.h's Print Spooler API. I haven't find any C++ examples or couldn't figure out solution, so I wanted ask your help. My code should done same as in this picture: Source…
Khaniini
  • 11
  • 2
0
votes
1 answer

understanding print-spooler Raw .spl structure

i have a project that is supposed to read a spooler .spl file and add extra information at the end of the file then forward it to another printer. My biggest headache is getting the structure of the .spl file to be able to extract just the printed…
Gomesh
  • 21
  • 4