Package com.lowagie.text

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


          cb.stroke();
          System.out.println("Processed page " + i);
          p++;
          if (p == pages) {
            p = 0;
            document.newPage();
          }
        }
        // step 5: we close the document
        document.close();
      }
View Full Code Here


            while (iteratorPDFReader.hasNext()) {
                final PdfReader pdfReader = iteratorPDFReader.next();

                // Create a new page in the target for each source page
                while (pageOfCurrentReaderPDF < pdfReader.getNumberOfPages()) {
                    document.newPage();
                    pageOfCurrentReaderPDF++;
                    currentPageNumber++;
                    page = writer.getImportedPage(pdfReader,
                            pageOfCurrentReaderPDF);
                    cb.addTemplate(page, 0, 0);
View Full Code Here

          float progressIncrement = (1.0f-startIncrement-endIncrement)/pageCount;
          for (int p=0;p< pageCount;p++) {
            setProgress(startIncrement+p*progressIncrement);
            document.setPageSize(new Rectangle((float)width,(float)height));
            if (p==0) document.open();
            else document.newPage();
           
            Graphics2D g = writer.getDirectContent().createGraphics((float)width, (float)height);
            printable.print(g, p);
            g.dispose();
          }
View Full Code Here

          }
        }
        while (i < n) {
          i++;
          document2.setPageSize(reader.getPageSizeWithRotation(i));
          document2.newPage();
          page = writer2.getImportedPage(reader, i);
          rotation = reader.getPageRotation(i);
          if (rotation == 90 || rotation == 270) {
            cb2.addTemplate(page, 0, -1f, 1f, 0, 0, reader.getPageSizeWithRotation(i).getHeight());
          }
View Full Code Here

          cb.stroke();
          System.out.println("Processed page " + i);
          p++;
          if (p == pages) {
            p = 0;
            document.newPage();
          }
        }
        // step 5: we close the document
        document.close();
      }
View Full Code Here

            ct.go();
            ct.setAlignment(Element.ALIGN_CENTER);
            ct.addText(new Chunk(he4, new Font(bf, 14)));
            ct.go();
           
            document.newPage();
            String atext = "\u062a\u0635\u0628\u062d ";
            PdfPTable table = new PdfPTable(5);
            table.setWidthPercentage(100);
            table.setRunDirection(PdfWriter.RUN_DIRECTION_NO_BIDI);
            for (int k = 0; k < 5; ++k) {
View Full Code Here

                System.out.println(status);
                vt.setAlignment(Element.ALIGN_RIGHT);
                vt.addText(new Chunk(texts[idx++], new Font(bf, 20, 0, Color.orange)));
                status = vt.go();
                System.out.println(status);
                document.newPage();
            }
            document.close();
        }
        catch (Exception de) {
            de.printStackTrace();
View Full Code Here

            document.open();
           
            // step 4: we add some paragraphs to the document
            document.add(new Paragraph("The default PageSize is DIN A4."));
            document.setPageSize(PageSize.A3);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A3."));
            document.setPageSize(PageSize.A2);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A2."));
            document.setPageSize(PageSize.A1);
View Full Code Here

            document.add(new Paragraph("The default PageSize is DIN A4."));
            document.setPageSize(PageSize.A3);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A3."));
            document.setPageSize(PageSize.A2);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A2."));
            document.setPageSize(PageSize.A1);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A1."));
            document.setPageSize(PageSize.A0);
View Full Code Here

            document.add(new Paragraph("This PageSize is DIN A3."));
            document.setPageSize(PageSize.A2);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A2."));
            document.setPageSize(PageSize.A1);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A1."));
            document.setPageSize(PageSize.A0);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A0."));
            document.setPageSize(PageSize.A5);
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.