Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfImportedPage


          .getOutputStream());
      // --Tranfer content
      int n = reader.getNumberOfPages();
      document.open();
      PdfContentByte cb = writer.getDirectContent();
      PdfImportedPage page;
      int rotation;
      int i = 0;
      while (i < n) {
        i++;
        document.setPageSize(reader.getPageSizeWithRotation(i));
View Full Code Here


       
        rptDunning.createReport();
        byte[] dunningPdf = rptDunning.getPdf();
       
        PdfReader pdfReader = new PdfReader(dunningPdf);
        PdfImportedPage origPage;
       
        //Add all pages of one pdf to the resulting pdf:
        for (int i=0; i<pdfReader.getNumberOfPages(); i++) {
            document.newPage();
            origPage = pdfWriter.getImportedPage(pdfReader, i+1);
View Full Code Here

       
        report.createReport();
        byte[] dunningPdf = report.getPdf();
       
        PdfReader pdfReader = new PdfReader(dunningPdf);
        PdfImportedPage origPage;
       
        //Add all pages of one pdf to the resulting pdf:
        for (int i=0; i<pdfReader.getNumberOfPages(); i++) {
            document.newPage();
            origPage = pdfWriter.getImportedPage(pdfReader, i+1);
View Full Code Here

      }

      document.open();

      for (int i = start; i <= endPage; i++) {
        PdfImportedPage page = writer.getImportedPage(reader, i);
        writer.addPage(page);
      }

      document.close();
      writer.close();
View Full Code Here

      for (InputStream source : sources) {
        PdfReader reader = new PdfReader(source);
        int pageCount = reader.getNumberOfPages();
        for (int i = 1; i <= pageCount; i++) {
          PdfImportedPage page = writer.getImportedPage(reader, i);
          writer.addPage(page);
        }
        reader.close();
      }
View Full Code Here

          }
          document = new Document(reader.getPageSizeWithRotation(1));
          outputStream = new InputOutputStream();
          writer = new PdfCopy(document, outputStream);
        }
        PdfImportedPage page = writer.getImportedPage(reader, i);
        writer.addPage(page);
      }

      if (document != null) {
        document.close();
View Full Code Here

          catch (Exception e) {
            logger.debug("Trying to evaluate response as a PDF file... ");
            try {
              PdfReader reader = new PdfReader(content);
              PdfContentByte cb = writer.getDirectContent();
              PdfImportedPage page = writer.getImportedPage(reader, 1);
              float[] tm = getTransformationMatrix(page, xPos, yPos, tableWidth, tableHeight);
              cb.addTemplate(page, tm[0], tm[1], tm[2], tm[3], tm[4], tm[5]);
            } catch (Exception x) {
              logger.error("Error in inserting image for document " + label, e);
              logger.error("Error in inserting pdf file for document " + label, x);
View Full Code Here

                    reader = new PdfReader(inputByteArray);
                }
                if (reader != null) {
                    int n = reader.getNumberOfPages();
                    for (int i=0; i < n; i++) {
                        PdfImportedPage pg = writer.getImportedPage(reader, i + 1);
                        //cb.addTemplate(pg, left, height * pgCnt);
                        writer.addPage(pg);
                        pgCnt++;
                    }
                }
View Full Code Here

      Document document = new Document(readerOrg.getPageSizeWithRotation(1));
      PdfCopy writer = new PdfCopy( document, out );
     
      document.open();

       PdfImportedPage page;
             for (int i = 0; i < paginasOrg; ) {
                 ++i;
                 page = writer.getImportedPage(readerOrg, i);
                 writer.addPage(page);
             }
View Full Code Here

            int p = 0;
            while (i < n) {
                document.newPage();
                p++;
                i++;
                PdfImportedPage page1 = writer.getImportedPage(reader, i);
                cb.addTemplate(page1, .5f, 0, 0, .5f, 60, 120);
                if (i < n) {
                    i++;
                    PdfImportedPage page2 = writer.getImportedPage(reader, i);
                    cb.addTemplate(page2, .5f, 0, 0, .5f, width / 2 + 60, 120);
                }
                BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
                cb.beginText();
                cb.setFontAndSize(bf, 14);
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.PdfImportedPage

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.