Recently bloggers are studying using Python to control printers
Here to organize the introduction of Win32print API, official website address http://timgolden.me.uk/pywin32-docs/win32print.html
OpenPrinter Open the specified printer and obtain a handle to the printer
GetPrinter getting information about a specified printer
SetPrinter control of the state of a printer
ClosePrinter to close an open printer object
AddPrinterConnection connecting the specified printer
Deleteprinterconnection Deleting a connection to a specified printer
EnumPrinters enumerating the printers installed in the system
GetDefaultPrinter get default printer name <type ' str ' >
GETDEFAULTPRINTERW get default printer name <type ' Unicode ' >
SetDefaultPrinter to a printer name <type ' str ' > set as Default printer
Setdefaultprinterw to a printer name <type ' Unicode ' > Set as Default printer
StartDocPrinter start a new document at the level of print spooling
Enddocprinter Specifies the end of a document at the level of the print spooler
Abortprinter Deleting a buffered file associated with a printer
Startpageprinter Specify the start of a new page in a print job
Endpageprinter Specifies the end of a page in a print job
StartDoc Start a print job
EndDoc end a successful print job
AbortDoc canceling the printing of a document
StartPage Call this function before printing a new page
EndPage Use this function to complete the printing of a page and prepare the device scene to print the next page
WritePrinter writes data from the sending directory to the printer
EnumJobs enumerating jobs in the print queue
Getjob getting information about a specified job
Setjob controlling the status of a print job
DocumentProperties Printer Configuration control function
Enumprintprocessors enumerating the available print processors in the system
Enumprintprocessordatatypes enumeration of data types supported by a print processor
Enumprinterdrivers enumeration Specifies which printer drivers are installed on the system
EnumForms enumerating the forms available for a single printer
AddForm Adding a new form to the printer's form list
Deleteform remove a form from the list of available forms in the printer
GetForm getting information about a specified form
Setform setting information for the specified form
AddJob is used to obtain a valid pathname so that it can be used to create a spool file for the job. It also assigns a job number to the job
Schedulejob submit a job to print
DeviceCapabilities Use this function to obtain information about the capabilities of a device
GetDeviceCaps get parameter settings for a specified device
Enummonitors enumeration of available print monitors
Enumports enumerating the ports available to a system
Getprintprocessordirectory determine the directory where the printer processor driver and files are included in the specified system
Getprinterdriverdirectory determine what directory the printer driver is included in the specified system
AddPrinter Adding a new printer to the system
Deleteprinter The specified printer flag to be removed from the system
Deleteprinterdriver Removing a printer driver from the system
Deleteprinterdriverex Removing a printer driver and related files from the system
Flushprinter Update printer, clear error status of printer
Python Learning Notes (Win32print API Introduction)