Package javax.print

Examples of javax.print.SimpleDoc


        Result res = new SAXResult(fop.getDefaultHandler());

        // Start XSLT transformation and FOP processing
        transformer.transform(src, res);

        Doc doc = new SimpleDoc(renderer, DocFlavor.SERVICE_FORMATTED.PAGEABLE, null);
        printJob.print(doc, null);
    }
View Full Code Here


                };
                job.addPrintJobListener(pjlistener);
                PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();

                DocAttributeSet das = new HashDocAttributeSet();
                Doc doc = new SimpleDoc(printIt, flavor, das);
                try {  
                        job.print(doc, pras);
                    } catch (PrintException pe) {
                        pe.printStackTrace();
                    }
View Full Code Here

                job.addPrintJobListener(pjlistener);
                PrintRequestAttributeSet pras =
                new HashPrintRequestAttributeSet();

                DocAttributeSet das = new HashDocAttributeSet();
                Doc doc = new SimpleDoc(printIt, flavor, das);
                try {  
                        job.print(doc, pras);
                    } catch (PrintException pe) {
                        pe.printStackTrace();
                    }       
View Full Code Here

//Especificamos el tipo de dato a imprimir
//Tipo: bytes; Subtipo: autodetectado
        DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;

        Doc doc = new SimpleDoc(bytes, flavor, null);
//Creamos un trabajo de impresión
        DocPrintJob job = null;
        if (services.length > 0) {
            for (int i = 0; i < services.length; i++) {
               
View Full Code Here

//Especificamos el tipo de dato a imprimir
//Tipo: bytes; Subtipo: autodetectado
        DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;

        Doc doc = new SimpleDoc(bytes, flavor, null);
//Creamos un trabajo de impresión
        DocPrintJob job = null;
        if (services.length > 0) {
//            for (int i = 0; i < services.length; i++) {
//                if (services[i].getName().equals("caja")) {//aqui escribimos/elegimos la impresora por la que queremos imprimir
View Full Code Here

//y le agregamos el string convertido (cuerpo del ticket) a bytes tal como
//lo maneja la impresora(mas bien ticketera :p)
        byte[] bytes = contentTicket.getBytes(); //Especificamos el tipo de dato a imprimir
//Tipo: bytes; Subtipo: autodetectado
        DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
        Doc doc = new SimpleDoc(bytes, flavor, null); //Creamos un trabajo de impresión
        DocPrintJob job = null;
        if (services.length > 0) {
            for (int i = 0; i < services.length; i++) {
                if (services[i].getName().equals("GP-5890X Series")) {
//aqui escribimos/elegimos la impresora por la que queremos imprimir
View Full Code Here

TOP

Related Classes of javax.print.SimpleDoc

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.