Examples of newPage()


Examples of com.itextpdf.text.Document.newPage()

                try {
                    com.itextpdf.text.Image image2 =
                            com.itextpdf.text.Image.getInstance(bufferedImage, null);
                    image2.scalePercent((float) scaler);
                    document.add(image2);
                    document.newPage();
                    int current = cpt.incrementAndGet();
                    int nbSlides = profile.getSlideCount();
                    System.out.println("Exported slide " + current + (nbSlides > 0 ? "/" + nbSlides : ""));
                    if (!profile.isLastSlide(current)) {
                        profile.nextSlide();
View Full Code Here

Examples of com.itextpdf.text.Document.newPage()

            page = getPage(writer, reader, i++);
            if (page != null)
                cb.addTemplate(page, right, bottom);

            doc.newPage();
        }
        doc.close();
    }

    private static void splitLine(Document doc, PdfWriter writer) {
View Full Code Here

Examples of com.itextpdf.text.Document.newPage()

            page = getPage(writer, reader, pages[i++]);
            if (page != null)
                cb.addTemplate(page, right, bottom);

            doc.newPage();
        }
        doc.close();
    }

    public static void main(String[] args) {
View Full Code Here

Examples of com.itextpdf.text.Document.newPage()

            PdfImportedPage page;
            float offsetX;
            for (int p = 1; p <= total; p++) {
                offsetX = 0;
                if (p % 2 != 0) {
                    document.newPage();
                } else {
                    offsetX = pageSize.getWidth();
                }
                page = writer.getImportedPage(reader, p);
                cb.addTemplate(page, offsetX, 0);
View Full Code Here

Examples of com.lowagie.text.Document.newPage()

    final PhysicalPageDrawable drawable = new PhysicalPageDrawable(logicalPageDrawable, page);
    drawable.draw(graphics, new Rectangle2D.Double(0, 0, width, height));

    graphics.dispose();

    document.newPage();
  }

  public void processLogicalPage(final LogicalPageKey key,
                                 final LogicalPageBox logicalPage)
      throws DocumentException
View Full Code Here

Examples of com.lowagie.text.Document.newPage()

        new PdfLogicalPageDrawable(logicalPage, metaData, writer, null, resourceManager, imageCache, version);
    logicalPageDrawable.draw(graphics, new Rectangle2D.Double(0, 0, width, height));

    graphics.dispose();

    document.newPage();
  }

  /**
   * Closes the document.
   */
 
View Full Code Here

Examples of com.lowagie.text.Document.newPage()

       
        pdfContent.addTemplate(pdfTemplate, 0, 0);
        g.dispose();
       
        if (page != pageCount - 1) {
          pdfDocument.newPage();
        }
      }
      pdfDocument.close();
    } catch (DocumentException ex) {
      IOException exception = new IOException("Couldn't print to PDF");
View Full Code Here

Examples of com.lowagie.text.Document.newPage()

            Document document = new Document(new Rectangle(
                    (float) bounds.getWidth(), (float) bounds.getHeight()));
            PdfWriter writer = PdfWriter.getInstance(document, out);
            document.open();
            for (int i = 0; i < pageStore.getPageCount(); ++i) {
                document.newPage();
                PdfContentByte pcb = writer.getDirectContent();
                Graphics2D g = pcb.createGraphics(
                        (float) pf.getWidth(), (float) pf.getHeight());
                Page page = pageStore.getPage(i);
                page.resolveForwards(context);
View Full Code Here

Examples of com.lowagie.text.Document.newPage()

            // First page, documentation info.           
            DroolsDocsComponentFactory.createFirstPage( document,
                                                        currentDate,
                                                        packageData );

            document.newPage();

            // List index of the rules           
            document.add( new Phrase( "Table of Contents" ) );
            document.add( DroolsDocsComponentFactory.createContents( packageData.getRules() ) );
View Full Code Here

Examples of com.lowagie.text.Document.newPage()

            // List index of the rules           
            document.add( new Phrase( "Table of Contents" ) );
            document.add( DroolsDocsComponentFactory.createContents( packageData.getRules() ) );

            document.newPage();

            for ( DrlRuleParser ruleData : packageData.getRules() ) {
                DroolsDocsComponentFactory.newRulePage( document,
                                                        packageData.getName(),
                                                        ruleData );
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.