Package com.sun.pdfview

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


            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

     */
    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

Related Classes of com.sun.pdfview.PDFPrintPage

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.