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


                    imgWidthPica=(72*img.plainWidth()) / dpiX;
                    imgHeightPica=(72*img.plainHeight()) / dpiY;
                    img.scaleAbsolute(imgWidthPica,imgHeightPica);
                    document.setPageSize(new Rectangle(imgWidthPica, imgHeightPica));
                  if (document.isOpen()) {
                    document.newPage();
                  }
                  else {
                    document.open();
                  }
                  img.setAbsolutePosition(0, 0);
View Full Code Here

            document.add(systemInfo);
        }

        document.setMargins(40, 40, 30, 30);
        document.setPageSize(PageSize.A4.rotate());
        document.newPage();

        if (image != null) {
            Image img = Image.getInstance(image, null);
            img.setAlignment(Element.ALIGN_CENTER);
            document.add(img);
View Full Code Here

        }


        document.setMargins(40,40,170,60);
        document.setPageSize(PageSize.A4);
        document.newPage();

        //list table with the path through the cities and distances between them
        document.add(new Paragraph("Rutas del Problema\n\n",new Font(Font.HELVETICA, 14, Font.BOLDITALIC)));

        //create font for header and cities.
View Full Code Here

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

          addCell(tableIntestazione, dataCompetenza, Element.ALIGN_CENTER, bold);

        }

        document.add(tableIntestazione);
        document.newPage();
      }

      document.close();

    } catch (DocumentException e) {
View Full Code Here

            graphics.dispose();
            // ImageIO.write(bI, "png", new File("c:\\Users\\moovida\\Desktop\\test.png"));
            // graphics.drawImage(bI, null, 0, 0);

            document.newPage();
            document.close();
            writer.close();
        } catch (DocumentException e) {
            e.printStackTrace();
            return false;
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

      for (int i = 0; i < total; i++) {
        p = i + 1;
        pageSize = reader.getPageSize(p);
        newSize = new Rectangle(pageSize.getWidth() / 2, pageSize.getHeight());

        document.newPage();
        offsetX = 0;
        offsetY = 0;
        page = writer.getImportedPage(reader, p);
        cb.addTemplate(page, 1, 0, 0, 1, offsetX, offsetY);
        document.newPage();
View Full Code Here

        document.newPage();
        offsetX = 0;
        offsetY = 0;
        page = writer.getImportedPage(reader, p);
        cb.addTemplate(page, 1, 0, 0, 1, offsetX, offsetY);
        document.newPage();
        offsetX = -newSize.getWidth();
        offsetY = 0;
        page = writer.getImportedPage(reader, p);
        cb.addTemplate(page, 1, 0, 0, 1, offsetX, offsetY);
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.