Package com.itextpdf.text

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


      document.newPage();
      for (int i=0; i<2;i++) {
        addChartToPDF2(charts1.get(i+4), writer, 1-i, 0);       
        addChartToPDF2(charts2.get(i+4), writer, 1-i, 1);       
      }
      document.newPage();
      for (int i=0; i<2;i++) {
        addChartToPDF2(charts1.get(i+6), writer, 1-i, 0);       
        addChartToPDF2(charts2.get(i+6), writer, 1-i, 1);       
      }
    } catch (DocumentException de) {
View Full Code Here


    document.open();
    populatePdf(document, writer, qr);

    // do we want to add a svg image?
    if (StringUtils.isNotBlank(svg)) {
      document.newPage();
      StringBuffer s1 = new StringBuffer(svg);
      if (!svg.startsWith("<svg xmlns=\"http://www.w3.org/2000/svg\" ")) {
        s1.insert(s1.indexOf("<svg") + 4, " xmlns='http://www.w3.org/2000/svg'");
      }
View Full Code Here

      final Document document = new Document();
      PdfWriter.getInstance(document, byteStream);
      document.open();
      document.add(new Paragraph(TEXT1, font));
      document.newPage();
      document.add(new Paragraph(TEXT2, font));
      document.close();

      final byte[] pdfBytes = byteStream.toByteArray();
     
View Full Code Here

        PdfReader currentReader = new PdfReader(testFile.getAbsolutePath());
        Document document = new Document(PageSize.A4, 0, 0, 0, 0);
        PdfWriter writer = PdfWriter.getInstance(document, new
                ByteArrayOutputStream());
        document.open();
        document.newPage();
        List links = currentReader.getLinks(1);
        PdfAnnotation.PdfImportedLink link =
            (PdfAnnotation.PdfImportedLink) links.get(0);
        writer.addAnnotation(link.createAnnotation(writer));
        document.close();
View Full Code Here

        PdfWriter.getInstance(document, new FileOutputStream(filename));
        document.open();
       
        for (int i = 0; i < pageContents.length; i++) {
            if (i != 0)
                document.newPage();

            String content = pageContents[i];
            Chunk contentChunk = new Chunk(content);
            document.add(contentChunk);
        }
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.