[Jsprintsetup] Problem using a specific printer

Kostas Fatolas fatolas at forthnet.gr
Thu Nov 5 07:39:30 PST 2009


Hello,

I have just installed your plugin for a project of mine.
My problem is that I have not been able to instruct firefox to use a
specific printer.

First of all I use *jsPrintSetup.getPrintersList()* to get the list of
printers (this works fine).
Then I use the following code with /'printername'/ one of the above.

Though it does not complain, each time it sends the document to my
default printer rather than the one I choose with *setPrinter()*.

I would appreciate any help on this!

My system is:

    /Linux 2.6.30-gentoo-r8 #1 SMP Mon Nov 2 11:35:30 EET 2009 i686
    Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz GenuineIntel GNU/Linux/

Firefox version is 3.5.4

Regards,

Kostas.

    function pp_printPage() {
        var printername = "CUPS/thermal";

        // set printer name
        jsPrintSetup.setPrinter(printername);

        // set orientation
        jsPrintSetup.setOption('orientation',
    jsPrintSetup.kPortraitOrientation);

        // set empty page header
        jsPrintSetup.setOption('headerStrLeft', '');
        jsPrintSetup.setOption('headerStrCenter', '');
        jsPrintSetup.setOption('headerStrRight', '');
        // set empty page footer
        jsPrintSetup.setOption('footerStrLeft', '');
        jsPrintSetup.setOption('footerStrCenter', '');
        jsPrintSetup.setOption('footerStrRight', '');

        // Suppress print dialog (for this context only)
        jsPrintSetup.clearSilentPrint();
        jsPrintSetup.setOption('printSilent', 1);

        // Do Print
        jsPrintSetup.print();

        jsPrintSetup.setOption('printSilent', 0);
    };

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mozdev.org/pipermail/jsprintsetup/attachments/20091105/678bffa0/attachment.html>


More information about the Jsprintsetup mailing list