Page 1 of 1

Print a File

Posted: Fri Aug 07, 2009 2:50 pm
by ConvertFromOldNGs
by Stephen >> Tue, 23 Mar 2004 4:00:32 GMT

Aargghhh!!!
I thought what I was doing would be quick and easy easy but its driving me insane...!!!!

I just want to be able to take a file and print it. No print dialogs etc... just print the damn thing! I have a method with parameters for the file to print and the name of the printer to print it on. I set the registry key for the default printer to the printer name given, then call shellExecute with the "print" action. This works some of the time. The default printer is successfully changed to whatever I set it to, but for some document types it still gives the print dialog, when for other file types it doesn't give the print dialog, and prints it nicely to the requested printer.

All I want to do is print a file to whatever printer I want. Note, this runs on the server in the background, hence can not have any print dialogs etc.. that need manual intervention. Surely within Jade there is an easier way to just print a file...?!??!

Anyone that can unscramble my brain would make my day....
Thanks!

Re: Print a File

Posted: Fri Aug 07, 2009 2:50 pm
by ConvertFromOldNGs
by petergallagher >> Tue, 23 Mar 2004 5:42:36 GMT

Hi Stephen,

We do this all the time. Yes it was a hassle but we seem to have sorted out the process. We do all our printing from a server app (GUI - No Forms).

Send me a note on peter@gbsltd.co.nz to initiate a private discussion

Peter Gallagher
Gallagher Business Systems

Re: Print a File

Posted: Fri Aug 07, 2009 2:50 pm
by ConvertFromOldNGs
by allistar >> Tue, 23 Mar 2004 10:13:24 GMT

Just out of interest - what sort of files are you trying to print? I mean, are they .txt, .sxw, .pdf, .doc?

Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

Re: Print a File

Posted: Fri Aug 07, 2009 2:50 pm
by ConvertFromOldNGs
by Stephen >> Tue, 23 Mar 2004 20:40:41 GMT

PDF and html files.