Examples of PDFPrintPage


Examples of com.sun.pdfview.PDFPrintPage

            jobName = "";
        }
        try {
            final ByteBuffer bb = ByteBuffer.wrap(pdf.getByteArray());
            final PDFFile pdfFile = new PDFFile(bb); // Create PDF Print Page
            final PDFPrintPage printPages = new PDFPrintPage(pdfFile); // Create
            // Print
            // Job
            final PrinterJob pjob = PrinterJob.getPrinterJob();
            final PageFormat pf = PrinterJob.getPrinterJob().defaultPage();
View Full Code Here

Examples of com.sun.pdfview.PDFPrintPage

            FileInputStream fis = new FileInputStream(file);
            FileChannel fc = fis.getChannel();
            ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
            PDFFile pdfFile = new PDFFile(bb); // Create PDF Print Page
            PDFPrintPage pages = new PDFPrintPage(pdfFile);

// Create Print Job
            PrinterJob pjob = PrinterJob.getPrinterJob();
            PageFormat pf = PrinterJob.getPrinterJob().defaultPage();
            pjob.setJobName(file.getName());
View Full Code Here

Examples of com.sun.pdfview.PDFPrintPage

     */
    public void doPrint() {
        PrinterJob pjob = PrinterJob.getPrinterJob();
        pjob.setJobName(docName);
        Book book = new Book();
        PDFPrintPage pages = new PDFPrintPage(curFile);
        book.append(pages, pformat, curFile.getNumPages());

        pjob.setPageable(book);
        if (pjob.printDialog()) {
            new PrintThread(pages, pjob).start();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.