Package java.awt.print

Examples of java.awt.print.Book


      }
    }

    pageFormat.setPaper(paper);

    Book book = new Book();
    book.append(this, pageFormat, lastPageIndex - firstPageIndex + 1);
    printJob.setPageable(book);
    try
    {
                    if (service == null) {
                        if (printJob.printDialog()) {
View Full Code Here


     * Print the current document.
     */
    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

      }
    }

    pageFormat.setPaper(paper);

    Book book = new Book();
    book.append(this, pageFormat, lastPageIndex - firstPageIndex + 1);
    printJob.setPageable(book);
    try
    {
                    if (service == null) {
                        if (printJob.printDialog()) {
View Full Code Here

  private Book book = new Book();
 
  private List<Book> books = new ArrayList<Book>();

  public String reinit() {
    book = new Book();
   
    return null;
  }
View Full Code Here

            paper.setImageableArea(0, 0, paper.getWidth() * 2,
                    paper.getHeight());
            pf.setPaper(paper);

            pjob.setJobName(jobName);
            final Book book = new Book();
            book.append(printPages, pf, pdfFile.getNumPages());
            pjob.setPageable(book); // Send print job to default printer
            if (pjob.printDialog()) {
                pjob.print();
                return true;
            }
View Full Code Here

    /**
     * Create a book. A book contains a pair of page painters called printables.
     * Also you have different pageformats.
     */
    Book book = new Book();
    /**
     * Append the Printable Object (this one itself, as it implements a
     * printable interface) and the page format.
     */
    book.append(new PrintFileToPrinter(), new PageFormat());
    /**
     * Set the object to be printed (the Book) into the PrinterJob. Doing this
     * before bringing up the print dialog allows the print dialog to correctly
     * display the page range to be printed and to dissallow any print settings
     * not appropriate for the pages to be printed.
View Full Code Here

// Create Print Job
            PrinterJob pjob = PrinterJob.getPrinterJob();
            PageFormat pf = PrinterJob.getPrinterJob().defaultPage();
            pjob.setJobName(file.getName());
            Book book = new Book();
            book.append(pages, pf, pdfFile.getNumPages());
            pjob.setPageable(book);

            if (pjob.printDialog()) {
                pjob.print();
            }
View Full Code Here

     * Print the current document.
     */
    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 java.awt.print.Book

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.