Examples of addTemplate()


Examples of com.itextpdf.text.pdf.PdfContentByte.addTemplate()

                    document.newPage();
                } else {
                    offsetX = pageSize.getWidth();
                }
                page = writer.getImportedPage(reader, p);
                cb.addTemplate(page, offsetX, 0);
            }
            // step 5: we close the document
            document.close();

            PdfReader reader2 = new PdfReader(new ByteArrayInputStream(tmp.toByteArray()));
View Full Code Here

Examples of com.lightcrafts.app.ComboFrame.addTemplate()

    }

    public void actionPerformed(ActionEvent event) {
        performPreAction( event );
        final ComboFrame frame = getComboFrame();
        frame.addTemplate();
    }
}
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.addTemplate()

        Graphics g = pdfTemplate.createGraphicsShapes((float)pageFormat.getWidth(),
            (float)pageFormat.getHeight());       
       
        printableComponent.print(g, pageFormat, page);
       
        pdfContent.addTemplate(pdfTemplate, 0, 0);
        g.dispose();
       
        if (page != pageCount - 1) {
          pdfDocument.newPage();
        }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.addTemplate()

      tp.setHeight(h);

      g2.drawImage(image, null, widthBorder, heightBorder);

      g2.dispose();
      cb.addTemplate(tp, 0, 0);

    } catch (DocumentException de) {
      System.err.println(de.getMessage());
    } catch (IOException ioe) {
      System.err.println(ioe.getMessage());
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.addTemplate()

        float dx = (factorx == factor ? 0f : ((x2 - x1) - rect.getWidth() * factor) / 2f);
        float dy = (factory == factor ? 0f : ((y1[p] - y2[p]) - rect.getHeight() * factor) / 2f);
        page = writer.getImportedPage(reader, i);
        rotation = reader.getPageRotation(i);
        if (rotation == 90 || rotation == 270) {
          cb.addTemplate(page, 0, -factor, factor, 0, x1 + dx, y2[p] + dy + rect.getHeight() * factor);
        }
        else {
          cb.addTemplate(page, factor, 0, 0, factor, x1 + dx, y2[p] + dy);
        }
        cb.setRGBColorStroke(0xC0, 0xC0, 0xC0);
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.addTemplate()

        rotation = reader.getPageRotation(i);
        if (rotation == 90 || rotation == 270) {
          cb.addTemplate(page, 0, -factor, factor, 0, x1 + dx, y2[p] + dy + rect.getHeight() * factor);
        }
        else {
          cb.addTemplate(page, factor, 0, 0, factor, x1 + dx, y2[p] + dy);
        }
        cb.setRGBColorStroke(0xC0, 0xC0, 0xC0);
        cb.rectangle(x3 - 5f, y2[p] - 5f, x4 - x3 + 10f, y1[p] - y2[p] + 10f);
        for (float l = y1[p] - 19; l > y2[p]; l -= 16) {
          cb.moveTo(x3, l);
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.addTemplate()

        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());
        }
        else {
          cb2.addTemplate(page, 1f, 0, 0, 1f, 0, 0);
        }
      }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.addTemplate()

        rotation = reader.getPageRotation(i);
        if (rotation == 90 || rotation == 270) {
          cb2.addTemplate(page, 0, -1f, 1f, 0, 0, reader.getPageSizeWithRotation(i).getHeight());
        }
        else {
          cb2.addTemplate(page, 1f, 0, 0, 1f, 0, 0);
        }
      }
      // step 5: we close the document
      document1.close();
      document2.close();
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.addTemplate()

         chart.draw(g2d, r2d);
         g2d.dispose();

         tp.sanityCheck();
         cb.addTemplate(tp, 0, 0);
         cb.sanityCheck();
      }
      catch (DocumentException de)
      {
         de.printStackTrace();
View Full Code Here

Examples of com.lowagie.text.pdf.PdfContentByte.addTemplate()

              document.open();
              PdfContentByte cb = writer.getDirectContent();
        PdfImportedPage page = writer.getImportedPage(reader, pagenumber);
        int rotation = reader.getPageRotation(pagenumber);
        if (rotation == 90 || rotation == 270) {
          cb.addTemplate(page, 0, -1f, 1f, 0, 0, reader.getPageSizeWithRotation(pagenumber).getHeight());
        }
        else {
          cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0);
        }
        // step 5: we close the document
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.