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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send External file (not .prn) to Spooler - winspool.drv

Status
Not open for further replies.

j3corp

Programmer
Nov 11, 2002
3
0
0
US
I know I posted this question on the API Section, but I have not received any responses and this question is killing me.
Here's what I am trying to do in a little bit of detail. I have a program which queries a database and then compiles an html report based on the results of that query. The html report is made using simple Print #x statements.
I would then like to create a pdf file based on the html file which was just created. In order to do so I must "print" the file to a pdfwriter or distiller. My problem comes into play because this program will end up making multiple reports by the time it is through, and I do not want any user intervention. So, the question is, how can I print an external file (of type .html), or send it directly to the printer?
First thing I tried was to run a shell command, but that brings up the print setup dialog, requiring someone to hit enter.
Second thing I tried was sending it to the spooler via winspool.drv functions. This appears to be the best way, but through all my searching, I have only found a way to send .prn files to the spooler to be printed correctly.

Does anyone know a way to do accomplish this conversion, or just how to print a file in general? I have never been so stumped!

I truly appreciate any and all input you may have on this subject.

Jim

p.s. I have already been able to change the default printer, edit registry keys for pdf information, so that is not the issue. It is just printing this file (which is not 'raw' or in the .prn format).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top