[Jslib] using jslib to send data to a printer

Pete Collins pete at mozdevgroup.com
Fri Feb 9 14:47:17 PST 2007



Joseph McDonald wrote:

>Thanks for that lookUpError pointer, very handy.
>
>pix1 is the name of the printer.  It is not actually a file.  But in a
>dos shell you can do:
>copy file.prn \\DELL1\pix
>and it will send the file to the printer raw.
>  
>

That's what I thought.

Try this:

  var fu = new FileUtils;

  var f = fu.nsIFile("c:\\test.prn");
  var d = fu.nsIFile("\\\\DELL1\\pix");

  f.copyTo(d, null);

See if that works ...

--pete

-- 
Pete Collins - Founder, Mozdev Group Inc.
www.mozdevgroup.com
Mozilla Software Development Solutions
tel: 1-719-302-5811
fax: 1-719-302-5813



More information about the Jslib mailing list