Package javax.print

Examples of javax.print.Doc


                                                          attributes);

            if (service != null) {
              final PrintRequestAttributeSet final_attributes = attributes;

              final Doc myDoc = new SimpleDoc(messagePrinter, messageFormat, null);

              final DocPrintJob final_job = service.createPrintJob();

              final MessagePrinterDisplay mpd = new MessagePrinterDisplay(messagePrinter, final_job, final_source);
View Full Code Here


                    Debug.logInfo("Adding DocAttribute: " + da, module);
                    docAttributeSet.add((DocAttribute) da);
                }
            }

            Doc myDoc = new SimpleDoc(bais, psInFormat, docAttributeSet);

            PrintService printer = null;

            // lookup the print service for the supplied printer name
            String printerName = (String) serviceContext.remove("printerName");
View Full Code Here

            throw new ViewHandlerException("Unable write to browser OutputStream", e);
        }
        */

        DocFlavor docFlavor = DocFlavor.BYTE_ARRAY.PDF;
        Doc myDoc = new SimpleDoc(out.toByteArray(), docFlavor, null);
        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
        aset.add(new Copies(1));
        //aset.add(MediaSize.A4);
        aset.add(Sides.ONE_SIDED);

View Full Code Here

        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

                aset.add(OrientationRequested.PORTRAIT);
                aset.add(new JobName(AppLocal.APP_NAME + " - Document", null));
                aset.add(media);

                DocPrintJob printjob = ps.createPrintJob();
                Doc doc = new SimpleDoc(new PrintableBasicTicket(m_ticketcurrent, imageable_x, imageable_y, imageable_width, imageable_height), DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);

                printjob.print(doc, aset);
            }

        } catch (PrintException ex) {
View Full Code Here

                "A" + (offset+pixA[9]) + ",180,0,1,1,1,N,\"" +"AGENCIA "  + Shared.getConfig("storeName") +"\"\n"+
                "B" + (offset+pixA[10]) + ",130,0,1,1,2,100,N,\"" + barCode + "\"\n"+
                "P" + firstLot + "\n";

            DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
            Doc doc = new SimpleDoc(buff.getBytes(), flavor, null);
            job.print(doc, null);
        } catch (PrintException ex) {
            MessageBox msb = new MessageBox(MessageBox.SGN_DANGER, "Problemas con la impresora.",ex);
            msb.show(Shared.getMyMainWindows());
        }
View Full Code Here

                "A" + pixA[9] + ",180,0,1,1,1,N,\"" +"AGENCIA "  + Shared.getConfig("storeName") +"\"\n"+
                "B" + pixA[10] + ",130,0,1,1,2,100,N,\"" + barCode + "\"\n"+
                "P1\n";

            DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
            Doc doc = new SimpleDoc(buff.getBytes(), flavor, null);
            job.print(doc, null);
        } catch (PrintException ex) {
            MessageBox msb = new MessageBox(MessageBox.SGN_DANGER, "Problemas con la impresora.",ex);
            msb.show(Shared.getMyMainWindows());
        }
View Full Code Here

                "A" + (offset+pixA[9]) + ",180,0,1,1,1,N,\""+"AGENCIA " +Shared.getConfig("storeName"+"\"\n"+
                "B" + (offset+pixA[10]) + ",130,0,1,1,2,100,N,\"" + barCodeB + "\"\n"+
                "P1\n";

            DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
            Doc doc = new SimpleDoc(buff.getBytes(), flavor, null);
            job.print(doc, null);
        } catch (PrintException ex) {
            MessageBox msb = new MessageBox(MessageBox.SGN_DANGER, "Problemas con la impresora.",ex);
            msb.show(Shared.getMyMainWindows());
        }
View Full Code Here

                    Debug.logInfo("Adding DocAttribute: " + da, module);
                    docAttributeSet.add((DocAttribute) da);
                }
            }

            Doc myDoc = new SimpleDoc(bais, psInFormat, docAttributeSet);

            PrintService printer = null;

            // lookup the print service for the supplied printer name
            String printerName = (String) serviceContext.remove("printerName");
View Full Code Here

            throw new ViewHandlerException("Unable write to browser OutputStream", e);
        }
        */

        DocFlavor docFlavor = DocFlavor.BYTE_ARRAY.PDF;
        Doc myDoc = new SimpleDoc(out.toByteArray(), docFlavor, null);
        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
        aset.add(new Copies(1));
        //aset.add(MediaSize.A4);
        aset.add(Sides.ONE_SIDED);

View Full Code Here

TOP

Related Classes of javax.print.Doc

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.