the function creates a new document in the printer spooler a document can contain multiple pages its used to schedule the print job in the spooler handle must be a valid handle to a printer the optional parameter document can be used to set an alternative document name 