Print a File

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Print a File

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

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!

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Print a File

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

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

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Print a File

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

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 ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Print a File

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

by Stephen >> Tue, 23 Mar 2004 20:40:41 GMT

PDF and html files.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 4 guests

cron