Package com.lowagie.text

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


        try {
            // step 2:
            // we create a writer that listens to the document and directs a PDF-stream to System.out (and a txt file)
            PdfWriter.getInstance(document, out);
            // step 3: we open the document
            document.open();

            addLogo(document);

            addCompanyInfo(document);
View Full Code Here


    ByteArrayOutputStream output = new ByteArrayOutputStream();

    try {
      Document document = new Document(PageSize.A3, 20, 20, 20, 20);
      PdfWriter writer = PdfWriter.getInstance(document, output);
      document.open();

      Paragraph p = new Paragraph();
      p.add(new Phrase("Deutsche Bank Mutui S.p.A. - SCHEDA DI CONTO", FontFactory.getFont(FontFactory.COURIER,
          16, Font.BOLD, new Color(0, 0, 0))));
      p.setAlignment(Element.ALIGN_RIGHT);
View Full Code Here

    {
      Document document = new Document(PageSize.A3.rotate(), 20, 20, 20, 20);
      PdfWriter writer = PdfWriter.getInstance(document, output);
      writer.setPageEvent(new BilancioPdf(listaBilancio));
     
      document.open();
     
      /*Image img = Image.getInstance("http://"+req.getServerName()+":"+req.getServerPort()+reportImagePath+"logo_dbm.jpg");
      img.setAlignment(Element.ALIGN_CENTER);
      document.add(img);*/
      Paragraph p = new Paragraph();
View Full Code Here

      Document document = new Document(pagesize, 50, 50, 50, 50);
      try {
        PdfWriter writer = PdfWriter.getInstance(document, out);
        document.addAuthor("JFreeChart");
        document.addSubject("Demonstration");
        document.open();
        PdfContentByte cb = writer.getDirectContent();
        PdfTemplate tp = cb.createTemplate(width, height);
        Graphics2D g2 = tp.createGraphics(width, height, mapper);
        Rectangle2D r2D = new Rectangle2D.Double(0, 0, width, height);
        chart.draw(g2, r2D);
View Full Code Here

   
    protected byte[] createPdf() throws Exception {
        Document document = new Document();
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        PdfWriter pdfWriter = PdfWriter.getInstance(document, outputStream);
        document.open();
        PdfContentByte cb = pdfWriter.getDirectContent(); // Holds the PDF
       
        Iterator<Dunning> it = this.getDunnings().iterator();
        while (it.hasNext()) {
            this.addReport(it.next(),pdfWriter,cb,document);
View Full Code Here

   
    protected byte[] createPdf() throws Exception {
        Document document = new Document();
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        PdfWriter pdfWriter = PdfWriter.getInstance(document, outputStream);
        document.open();
        PdfContentByte cb = pdfWriter.getDirectContent(); // Holds the PDF
       
        Iterator it = this.getJbsObjects().iterator();
        while (it.hasNext()) {
            this.addReport((JbsObject)it.next(),pdfWriter,cb,document);
View Full Code Here

      int endPage = end;
      if (endPage > pageCount) {
        endPage = pageCount;
      }

      document.open();

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

      Document document = new Document();
      InputOutputStream outputStream = new InputOutputStream();
      PdfCopy writer = new PdfCopy(document, outputStream);

      document.open();

      for (InputStream source : sources) {
        PdfReader reader = new PdfReader(source);
        int pageCount = reader.getNumberOfPages();
        for (int i = 1; i <= pageCount; i++) {
View Full Code Here

      Document pdfDocument = new Document();
      PdfWriter docWriter = PdfWriter.getInstance(pdfDocument, new FileOutputStream(tmpFile));
      //pdfDocument.open();
      if(multichart)
      {
        pdfDocument.open();

        List images = new ArrayList();
        for(int i = 0; i < MAX_NUM_IMG; i++)
        {
          String imgName = (new StringBuilder(String.valueOf(path.substring(0, path.indexOf(".png"))))).append(i).append(".png").toString();
View Full Code Here

        // if in need to change layout
        if(width > MAX_WIDTH || height > MAX_HEIGHT){
          changeLayout(pdfDocument, jpg, width, height);
        }

        pdfDocument.open();
        pdfDocument.add(jpg);
      }
      pdfDocument.close();
      docWriter.close();
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.