Link to home
Start Free TrialLog in
Avatar of scs1
scs1

asked on

Printing a text file

How can I send a text file directly to a printer from inside my program?  I will let the user select the printer using the standard printer dialog box.
Avatar of pagladasu
pagladasu

Use the C function mktemp() to create a unique filename.
Copy the file to be printed to this unique filename.
Use the API ::SpoolFile() to print the file
ASKER CERTIFIED SOLUTION
Avatar of ATucker
ATucker

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scs1

ASKER

it looks like a may not need this option anymore.  However, thanks for the help.  It seems to be very detailed.  I did cut and past the code and there seems to be some missing declarations.  Thanks for the help