Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch Printing

Status
Not open for further replies.

jl39775

Programmer
Feb 19, 2004
5
US
Does anyone know how I can print multiple files in one print job. I looked at calling the SetJob api but I do not know how to use it to print multiple files. Can anyone help?

Thanks,

James
 
use openprinter to open the printer
use startdoc to start a new document
use startpage to start a new page
now spool a file
use endpage to separate pages
use startpage to start a new page
now spool a file
use endpage to separate pages
use startpage to start a new page
now spool a file
use endpage to separate pages
now use enddoc to end the document
use closeprinter to close the printer

 
LightSeeker,

When I first started my project I did what you mentioned. However, this does not work for all file types. When I print a Visio or Word file it send binary data to the printer and prints trash. I can print the file in the correct format using the ShellExecute API call. However, this prints files in separate jobs. I am playing with the SetJob API but I do not know how to use it. Does anyone have any ideas?

Thanks,

James
 
LightSeeker,

When I first started my project I did what you mentioned. However, this does not work for all file types. When I print a Visio or Word file it send binary data to the printer and prints trash. I can print the file in the correct format using the ShellExecute API call. However, this prints files in separate jobs. I am playing with the SetJob API but I do not know how to use it. Does anyone have any ideas?

Thanks,

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top