خرید بک لینک

Vote count: 0

My JFX program prepared and prints out a set of Nodes.

//This is ModPrintCycle. It is the Window that gives the options to print

//public PrintCycle data;
    //PrintCycle is a HashMap of VBoxes containing all the details
//PrinterJob pj;
//ChoiceBox<String> cbxPrinters = new ChoiceBox<String>();
//ArrayList<Printer> arrPrinters = new ArrayList<Printer>();
//util.say just pops out a messagebox attached to the .

public void printAll(ArrayList<String> pageList){
    if(cbxPrinters.getSelectionModel().getSelectedIndex() >=0){
        if (data.tables.size() > 0){
            Printer curP = Printer.getDefaultPrinter();
                if(arrPrinters.size() > 0 ){
                    curP = arrPrinters.get(cbxPrinters.getSelectionModel().getSelectedIndex());
                }
                try{
                    pj = PrinterJob.createPrinterJob(curP);
                    PageLayout pp = curP.createPageLayout(Paper.LEGAL, PageOrientation.PORTRAIT, MarginType.DEFAULT);
                    PageLayout pl = curP.createPageLayout(Paper.LEGAL, PageOrientation.LANDSCAPE, MarginType.DEFAULT);

                    for(String p : pageList){
                        Printable pt = data.tables.get(p);
                        pt.scaleToFit();
                        if(pt.isLandscape()){
                            pj.printPage(pl,pt);    
                        }
                        else{
                            pj.printPage(pp,pt);
                        }   
                    }

                    pj.endJob();
                }catch(Exception e){
                    util.say(ModPrintCycle.this, "Error on Print"); 
                }   
        }else{
            util.say(ModPrintCycle.this, "Nothing to print");
        }
    }
    else{
        util.say(ModPrintCycle.this, "No Printer Selected");
    }
}

Printer is installed and set as default, and my program detects it. But when I print, no errors pop out, and the printed receives no jobs.

I'm sure my program worked before. But now, I transfered it to a different computer. A Lubuntu 15.10, 64-bit. I have openjfx and openjdk version "1.8.0_66-inteal" installed.

What can I do to find out why it's not printing?

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 16 فروردين 1395 ساعت: 8:37

صفحه بندی