Package com.lowagie.text

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


      imageFileOutputStream = new FileOutputStream(imageFile);
      transformSVGIntoPNG(inputStream, imageFileOutputStream);
     
        Document pdfDocument = new Document(PageSize.A4.rotate());
        PdfWriter docWriter = PdfWriter.getInstance(pdfDocument, outputStream);
        pdfDocument.open();
        Image jpg = Image.getInstance(imageFile.getPath());
        fitImage(jpg);
     
        pdfDocument.add(jpg);
        pdfDocument.close();
View Full Code Here


    logger.debug("document size width: "+docWidth+ " height: "+docHeight);

    //PdfWriter writer=PdfWriter.getInstance(document,new FileOutputStream("C:/comp/SpagoBIProva.pdf"));
    PdfWriter writer=PdfWriter.getInstance(document,fileOutputStream);
    document.open();

    int documentsNumber=documentsMap.keySet().size();
    int columnnsNumber=2;

    if(defaultStyle==true){
View Full Code Here

            Document document = new Document();
            document.setPageSize(PageSize.LETTER);   
            //Rectangle rect = document.getPageSize();
            //PdfWriter writer = PdfWriter.getInstance(document, baos);
            PdfCopy writer = new PdfCopy(document, baos);
            document.open();
            Iterator iter = compDocParts.iterator();
            int pgCnt =0;
            while (iter.hasNext()) {
                GenericValue contentAssocRevisionItemView = (GenericValue)iter.next();
                //String thisContentId = contentAssocRevisionItemView.getString("contentId");
View Full Code Here

            //ByteArrayOutputStream baos = new ByteArrayOutputStream();
            Document document = new Document();
            document.setPageSize(PageSize.LETTER);   
            //Rectangle rect = document.getPageSize();
            //PdfCopy writer = new PdfCopy(document, baos);
            document.open();

            GenericValue dataResource = null;
            if (UtilValidate.isEmpty(contentRevisionSeqId)) {
                GenericValue content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentId));
                dataResourceId = content.getString("dataResourceId");
View Full Code Here

        Document document = new Document(paperRectangle, 0f, 0f, 0f, 0f);

        try {

            PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(outputPdfFile));
            document.open();

            PdfContentByte cb = writer.getDirectContent();
            Graphics2D graphics = cb
                    .createGraphics(paperRectangle.getWidth(), paperRectangle.getHeight());
View Full Code Here

      int paginasDest = readerDest.getNumberOfPages();
     
      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);
View Full Code Here

         
          File dirF = new File(dirS);
            tmpFile = File.createTempFile("tempPDFExport", ".pdf", dirF);
            Document pdfDocument = new Document();
            PdfWriter docWriter = PdfWriter.getInstance(pdfDocument, new FileOutputStream(tmpFile));
            pdfDocument.open();
            Image jpg = Image.getInstance(imageFile.getPath());
            jpg.setRotation(new Double(Math.PI/2).floatValue());
            jpg.scaleAbsolute(770, 520);
            pdfDocument.add(jpg);
            pdfDocument.close();
View Full Code Here

         
          File dirF = new File(dirS);
            tmpFile = File.createTempFile("tempPDFExport", ".pdf", dirF);
            Document pdfDocument = new Document();
            PdfWriter docWriter = PdfWriter.getInstance(pdfDocument, new FileOutputStream(tmpFile));
            pdfDocument.open();
            Image jpg = Image.getInstance(imageFile.getPath());
            jpg.setRotation(new Double(Math.PI/2).floatValue());
            jpg.scaleAbsolute(770, 520);
            pdfDocument.add(jpg);
            pdfDocument.close();
View Full Code Here

      imageFileOutputStream = new FileOutputStream(imageFile);
      transformSVGIntoPNG(inputStream, imageFileOutputStream);
     
        Document pdfDocument = new Document(PageSize.A4.rotate());
        PdfWriter docWriter = PdfWriter.getInstance(pdfDocument, outputStream);
        pdfDocument.open();
        Image jpg = Image.getInstance(imageFile.getPath());
        fitImage(jpg);
     
        pdfDocument.add(jpg);
        pdfDocument.close();
View Full Code Here

            PdfWriter.getInstance(document, out);

            // Fill the virtual PDF table with the necessary data
            generatePDFTable();
            document.open();
            document.setFooter(footer);
            document.add(this.tablePDF);
            document.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.