Versions in this module Expand all Collapse all v0 v0.0.1 Apr 16, 2023 Changes in this version + const JOB_CONTROL_CANCEL + const JOB_CONTROL_DELETE + const JOB_CONTROL_LAST_PAGE_EJECTED + const JOB_CONTROL_PAUSE + const JOB_CONTROL_RELEASE + const JOB_CONTROL_RESTART + const JOB_CONTROL_RESUME + const JOB_CONTROL_RETAIN + const JOB_CONTROL_SENT_TO_PRINTER + const JOB_NOTIFY_FIELD_BYTES_PRINTED + const JOB_NOTIFY_FIELD_DATATYPE + const JOB_NOTIFY_FIELD_DEVMODE + const JOB_NOTIFY_FIELD_DOCUMENT + const JOB_NOTIFY_FIELD_DRIVER_NAME + const JOB_NOTIFY_FIELD_MACHINE_NAME + const JOB_NOTIFY_FIELD_NOTIFY_NAME + const JOB_NOTIFY_FIELD_PAGES_PRINTED + const JOB_NOTIFY_FIELD_PARAMETERS + const JOB_NOTIFY_FIELD_PORT_NAME + const JOB_NOTIFY_FIELD_POSITION + const JOB_NOTIFY_FIELD_PRINTER_NAME + const JOB_NOTIFY_FIELD_PRINT_PROCESSOR + const JOB_NOTIFY_FIELD_PRIORITY + const JOB_NOTIFY_FIELD_REMOTE_JOB_ID + const JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR + const JOB_NOTIFY_FIELD_START_TIME + const JOB_NOTIFY_FIELD_STATUS + const JOB_NOTIFY_FIELD_STATUS_STRING + const JOB_NOTIFY_FIELD_SUBMITTED + const JOB_NOTIFY_FIELD_TIME + const JOB_NOTIFY_FIELD_TOTAL_BYTES + const JOB_NOTIFY_FIELD_TOTAL_PAGES + const JOB_NOTIFY_FIELD_UNTIL_TIME + const JOB_NOTIFY_FIELD_USER_NAME + const JOB_NOTIFY_TYPE + const JOB_POSITION_UNSPECIFIED + const JOB_STATUS_BLOCKED_DEVQ + const JOB_STATUS_COMPLETE + const JOB_STATUS_DELETED + const JOB_STATUS_DELETING + const JOB_STATUS_ERROR + const JOB_STATUS_OFFLINE + const JOB_STATUS_PAPEROUT + const JOB_STATUS_PAUSED + const JOB_STATUS_PRINTED + const JOB_STATUS_PRINTING + const JOB_STATUS_RENDERING_LOCALLY + const JOB_STATUS_RESTART + const JOB_STATUS_RETAINED + const JOB_STATUS_SPOOLING + const JOB_STATUS_USER_INTERVENTION + const PRINTER_CHANGE_ADD_FORM + const PRINTER_CHANGE_ADD_JOB + const PRINTER_CHANGE_ADD_PORT + const PRINTER_CHANGE_ADD_PRINTER + const PRINTER_CHANGE_ADD_PRINTER_DRIVER + const PRINTER_CHANGE_ADD_PRINT_PROCESSOR + const PRINTER_CHANGE_ALL + const PRINTER_CHANGE_CONFIGURE_PORT + const PRINTER_CHANGE_DELETE_FORM + const PRINTER_CHANGE_DELETE_JOB + const PRINTER_CHANGE_DELETE_PORT + const PRINTER_CHANGE_DELETE_PRINTER + const PRINTER_CHANGE_DELETE_PRINTER_DRIVER + const PRINTER_CHANGE_DELETE_PRINT_PROCESSOR + const PRINTER_CHANGE_FAILED_CONNECTION_PRINTER + const PRINTER_CHANGE_FORM + const PRINTER_CHANGE_JOB + const PRINTER_CHANGE_PORT + const PRINTER_CHANGE_PRINTER + const PRINTER_CHANGE_PRINTER_DRIVER + const PRINTER_CHANGE_PRINT_PROCESSOR + const PRINTER_CHANGE_SERVER + const PRINTER_CHANGE_SET_FORM + const PRINTER_CHANGE_SET_JOB + const PRINTER_CHANGE_SET_PRINTER + const PRINTER_CHANGE_SET_PRINTER_DRIVER + const PRINTER_CHANGE_TIMEOUT + const PRINTER_CHANGE_WRITE_JOB + const PRINTER_DRIVER_XPS + const PRINTER_ENUM_CONNECTIONS + const PRINTER_ENUM_LOCAL + const PRINTER_NOTIFY_INFO_DISCARDED + const PRINTER_NOTIFY_MAX_NOTIFICATIONS + const PRINTER_NOTIFY_OPTIONS_REFRESH + const PRINTER_NOTIFY_TYPE + var ErrNoNotification = errors.New("no notification information") + var JobNotifyAll = []uint16 + func ClosePrinter(h syscall.Handle) (err error) + func Default() (string, error) + func EndDocPrinter(h syscall.Handle) (err error) + func EndPagePrinter(h syscall.Handle) (err error) + func EnumJobs(h syscall.Handle, firstJob uint32, noJobs uint32, level uint32, buf *byte, ...) (err error) + func EnumPrinters(flags uint32, name *uint16, level uint32, buf *byte, bufN uint32, ...) (err error) + func FindClosePrinterChangeNotification(h syscall.Handle) (err error) + func FindFirstPrinterChangeNotification(h syscall.Handle, filter uint32, options uint32, ...) (rtn syscall.Handle, err error) + func FindNextPrinterChangeNotification(h syscall.Handle, cause *uint16, options *PRINTER_NOTIFY_OPTIONS, ...) (err error) + func FreePrinterNotifyInfo(info *PRINTER_NOTIFY_INFO) (err error) + func GetDefaultPrinter(buf *uint16, bufN *uint32) (err error) + func GetJob(h syscall.Handle, jobId uint32, level uint32, buf *byte, bufN uint32, ...) (err error) + func GetPrinter(h syscall.Handle, level uint32, buf *byte, bufN uint32, needed *uint32) (err error) + func GetPrinterDriver(h syscall.Handle, env *uint16, level uint32, di *byte, n uint32, ...) (err error) + func JobNotifyFieldToString(field uint16) string + func OpenPrinter(name *uint16, h *syscall.Handle, defaults uintptr) (err error) + func ReadNames() ([]string, error) + func SetJob(h syscall.Handle, jobId uint32, level uint32, buf *byte, command uint32) (err error) + func StartDocPrinter(h syscall.Handle, level uint32, docinfo *DOC_INFO_1) (rtn uint32, err error) + func StartPagePrinter(h syscall.Handle) (err error) + func WritePrinter(h syscall.Handle, buf *byte, bufN uint32, written *uint32) (err error) + type ChangeNotificationHandle struct + func (c *ChangeNotificationHandle) Close() error + func (c *ChangeNotificationHandle) Next(printerNotifyOptions *PRINTER_NOTIFY_OPTIONS) (*NotifyInfo, error) + func (c *ChangeNotificationHandle) Wait(milliseconds uint32) (uint32, error) + type DOC_INFO_1 struct + Datatype *uint16 + DocName *uint16 + OutputFile *uint16 + type DRIVER_INFO_8 struct + ColorProfiles *uint16 + ConfigFile *uint16 + CoreDriverDependencies *uint16 + DataFile *uint16 + DefaultDataType *uint16 + DependentFiles *uint16 + DriverDate syscall.Filetime + DriverPath *uint16 + DriverVersion uint64 + Environment *uint16 + HardwareID *uint16 + HelpFile *uint16 + InfPath *uint16 + MfgName *uint16 + MinInboxDriverVerDate syscall.Filetime + MinInboxDriverVerVersion uint32 + MonitorName *uint16 + Name *uint16 + OEMUrl *uint16 + PreviousNames *uint16 + PrintProcessor *uint16 + PrinterDriverAttributes uint32 + Provider *uint16 + VendorSetup *uint16 + Version uint32 + type DriverInfo struct + Attributes uint32 + DriverPath string + Environment string + Name string + type Info struct + Attributes uint32 + DeviceNotSelectedTimeout uint32 + PortName string + PrinterName string + TransmissionRetryTimeout uint32 + type JOB_INFO_4 struct + DataType *uint16 + Devmode unsafe.Pointer + Document *uint16 + DriverName *uint16 + JobID uint32 + MachineName *uint16 + NotifyName *uint16 + PagesPrinted uint32 + Parameters *uint16 + Position uint32 + PrintProcessor *uint16 + PrinterName *uint16 + Priority uint32 + SecurityDescriptor unsafe.Pointer + Size uint32 + SizeHigh uint32 + StartTime uint32 + Status *uint16 + StatusCode uint32 + Submitted syscall.Systemtime + Time uint32 + TotalPages uint32 + UntilTime uint32 + UserName *uint16 + func (j *JOB_INFO_4) ToJobInfo() *JobInfo + type JobInfo struct + DataType string + DocumentName string + DriverName string + JobID uint32 + NotifyName string + PagesPrinted uint32 + Parameters string + Position uint32 + PrintProcessor string + PrinterName string + Priority uint32 + Size uint64 + StartTime uint32 + Status string + StatusCode uint32 + Submitted time.Time + Time time.Duration + TotalPages uint32 + UntilTime uint32 + UserMachineName string + UserName string + type NOTIFY_DATA struct + Dataptr unsafe.Pointer + Datasz uint32 + type NotifyInfo struct + Cause uint + Data []*NotifyInfoData + Flags uint + Version int + func (pni *NotifyInfo) String() string + type NotifyInfoData struct + Field uint16 + ID uint32 + Type uint16 + Value interface{} + func (pnid *NotifyInfoData) String() string + type PRINTER_INFO_5 struct + Attributes uint32 + DeviceNotSelectedTimeout uint32 + PortName *uint16 + PrinterName *uint16 + TransmissionRetryTimeout uint32 + type PRINTER_NOTIFY_INFO struct + Count uint32 + Flags uint32 + PData [PRINTER_NOTIFY_MAX_NOTIFICATIONS]PRINTER_NOTIFY_INFO_DATA + Version uint32 + func (pni *PRINTER_NOTIFY_INFO) ToNotifyInfo() *NotifyInfo + type PRINTER_NOTIFY_INFO_DATA struct + Field uint16 + ID uint32 + NotifyData NOTIFY_DATA + Reserved uint32 + Type uint16 + func (pnid *PRINTER_NOTIFY_INFO_DATA) ToNotifyInfoData() *NotifyInfoData + type PRINTER_NOTIFY_OPTIONS struct + Count uint32 + Flags uint32 + PTypes *PRINTER_NOTIFY_OPTIONS_TYPE + Version uint32 + type PRINTER_NOTIFY_OPTIONS_TYPE struct + Count uint32 + PFields *uint16 + Reserved0 uint16 + Reserved1 uint32 + Reserved2 uint32 + Type uint16 + type Printer struct + func Open(name string) (*Printer, error) + func (p *Printer) ChangeNotifications(filter uint32, options uint32, printerNotifyOptions *PRINTER_NOTIFY_OPTIONS) (*ChangeNotificationHandle, error) + func (p *Printer) Close() error + func (p *Printer) DriverInfo() (*DriverInfo, error) + func (p *Printer) EndDocument() error + func (p *Printer) EndPage() error + func (p *Printer) GetNotifications(done <-chan struct{}, filter uint32, options uint32, ...) (<-chan *NotifyInfo, error) + func (p *Printer) Job(jobId uint32) (*JobInfo, error) + func (p *Printer) Jobs() ([]JobInfo, error) + func (p *Printer) PrinterInfo() (*Info, error) + func (p *Printer) SetJob(jobID uint32, jobInfo *JobInfo, command uint32) error + func (p *Printer) StartDocument(name, outputFile, datatype string) (uint32, error) + func (p *Printer) StartPage() error + func (p *Printer) StartRawDocument(name, outputFile string) (uint32, error) + func (p *Printer) Write(b []byte) (int, error)