[Jslib] using jslib to send data to a printer

Joseph McDonald superjoe at gmail.com
Fri Feb 9 13:58:31 PST 2007


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.

thanks,
-joe

On 2/9/07, Pete Collins <pete at mozdevgroup.com> wrote:
>
>
> Joseph McDonald wrote:
>
> >I tried this:
> >var fu = new FileUtils();
> >JS_LIB_DEBUG=1
> >1
> >fu.copy("c:\\test.prn", "\\\\DELL1\\pix");
> >-2152857608
> >
> >for some reason it doesn't like that syntax for the the printer.
> >this is a stumper.
> >
> >
> include(jslib_xpcom);
>
> lookUpError(2152857608);
>
> NS_ERROR_FILE_ALREADY_EXISTS
>
> Try:
>
>   fu.remove("\\\\DELL1\\pix");
>
> if pix is a removable file ...
>
> Otherwise, what is pix?
>
> --pete
>
> --
> Pete Collins - Founder, Mozdev Group Inc.
> www.mozdevgroup.com
> Mozilla Software Development Solutions
> tel: 1-719-302-5811
> fax: 1-719-302-5813
>
> _______________________________________________
> Jslib mailing list
> Jslib at mozdev.org
> http://mozdev.org/mailman/listinfo/jslib
>


More information about the Jslib mailing list