Examples of scaleAbsolute()


Examples of com.lowagie.text.Image.scaleAbsolute()

            // step 3: we open the document
            document.open();
           
            // step 4: we add content
            Image jpg1 = Image.getInstance("otsoe.jpg");
            jpg1.scaleAbsolute(160, 120);
            document.add(new Paragraph("scaleAbsolute(160, 120)"));
            document.add(jpg1);
            Image jpg2 = Image.getInstance("otsoe.jpg");
            jpg2.scalePercent(50);
            document.add(new Paragraph("scalePercent(50)"));
View Full Code Here

Examples of com.lowagie.text.Image.scaleAbsolute()

            Image jpg2 = Image.getInstance("otsoe.jpg");
            jpg2.scalePercent(50);
            document.add(new Paragraph("scalePercent(50)"));
            document.add(jpg2);
            Image jpg3 = Image.getInstance("otsoe.jpg");
            jpg3.scaleAbsolute(320, 120);
            document.add(new Paragraph("scaleAbsolute(320, 120)"));
            document.add(jpg3);
            Image jpg4 = Image.getInstance("otsoe.jpg");
            jpg4.scalePercent(100, 50);
            document.add(new Paragraph("scalePercent(100, 50)"));
View Full Code Here

Examples of com.lowagie.text.Image.scaleAbsolute()

                          Document document) {

        try {
            Image image = Image.getInstance( DroolsDocsBuilder.class.getResource( "guvnor-webapp.png" ) ); // TODO this image never existed
            image.setAlignment( Image.RIGHT );
            image.scaleAbsolute( 100,
                                 30 );
            Rectangle page = document.getPageSize();
            PdfPTable head = new PdfPTable( 2 );

            PdfPCell cell1 = new PdfPCell( image );
View Full Code Here

Examples of com.lowagie.text.LwgImage.scaleAbsolute()

                    if (dpiY == 0) {
                        dpiY = 72;
                    }
                    imgWidthPica = (72 * img.getPlainWidth()) / dpiX;
                    imgHeightPica = (72 * img.getPlainHeight()) / dpiY;
                    img.scaleAbsolute(imgWidthPica, imgHeightPica);
                    document.setPageSize(new LwgRectangle(imgWidthPica,
                            imgHeightPica));
                    if (document.isOpen()) {
                        document.newPage();
                    } else {
View Full Code Here

Examples of com.lowagie.text.LwgImage.scaleAbsolute()

            if (intDpiY == 0)
               intDpiY = GfrPdfPhotoAlbumFromAbs._INT_DEFAULT_DPI_;

            float fltImgWidthPica = (GfrPdfPhotoAlbumFromAbs._INT_DEFAULT_DPI_ * img.getPlainWidth()) / intDpiX;
            float fltImgHeightPica = (GfrPdfPhotoAlbumFromAbs._INT_DEFAULT_DPI_ * img.getPlainHeight()) / intDpiY;
            img.scaleAbsolute(fltImgWidthPica, fltImgHeightPica);

            document.setPageSize(new LwgRectangle(fltImgWidthPica, fltImgHeightPica));

            if (document.isOpen())
            {
View Full Code Here

Examples of com.lowagie.text.LwgImage.scaleAbsolute()

      //          e1.printStackTrace();
      //        }

      // set the image attributes

      img.scaleAbsolute(this.desiredWidth.floatValue()
          / PIXEL_TWIPS_FACTOR, this.desiredHeight.floatValue()
          / PIXEL_TWIPS_FACTOR);
      img.scaleAbsolute(this.width.floatValue() / PIXEL_TWIPS_FACTOR,
          this.height.floatValue() / PIXEL_TWIPS_FACTOR);
      img.scalePercent(this.scaleX.floatValue(), this.scaleY.floatValue());
View Full Code Here

Examples of com.lowagie.text.LwgImage.scaleAbsolute()

      // set the image attributes

      img.scaleAbsolute(this.desiredWidth.floatValue()
          / PIXEL_TWIPS_FACTOR, this.desiredHeight.floatValue()
          / PIXEL_TWIPS_FACTOR);
      img.scaleAbsolute(this.width.floatValue() / PIXEL_TWIPS_FACTOR,
          this.height.floatValue() / PIXEL_TWIPS_FACTOR);
      img.scalePercent(this.scaleX.floatValue(), this.scaleY.floatValue());
      //        img.setBorder(value);

      try {
View Full Code Here

Examples of com.lowagie.text.LwgImage.scaleAbsolute()

            // step 3: we open the document
            document.open();
           
            // step 4: we add content
            LwgImage jpg1 = LwgImage.getInstance("otsoe.jpg");
            jpg1.scaleAbsolute(160, 120);
            document.add(new Paragraph("scaleAbsolute(160, 120)"));
            document.add(jpg1);
            LwgImage jpg2 = LwgImage.getInstance("otsoe.jpg");
            jpg2.scalePercent(50);
            document.add(new Paragraph("scalePercent(50)"));
View Full Code Here

Examples of com.lowagie.text.LwgImage.scaleAbsolute()

            LwgImage jpg2 = LwgImage.getInstance("otsoe.jpg");
            jpg2.scalePercent(50);
            document.add(new Paragraph("scalePercent(50)"));
            document.add(jpg2);
            LwgImage jpg3 = LwgImage.getInstance("otsoe.jpg");
            jpg3.scaleAbsolute(320, 120);
            document.add(new Paragraph("scaleAbsolute(320, 120)"));
            document.add(jpg3);
            LwgImage jpg4 = LwgImage.getInstance("otsoe.jpg");
            jpg4.scalePercent(100, 50);
            document.add(new Paragraph("scalePercent(100, 50)"));
View Full Code Here

Examples of com.lowagie.text.LwgImage.scaleAbsolute()

                        LwgImage bmp = BmpImage.getImage(inb, true, b.length);
                        cb.saveState();
                        cb.rectangle(xDest, yDest, destWidth, destHeight);
                        cb.clip();
                        cb.newPath();
                        bmp.scaleAbsolute(destWidth * bmp.getWidth() / srcWidth, -destHeight * bmp.getHeight() / srcHeight);
                        bmp.setAbsolutePosition(xDest - destWidth * xSrc / srcWidth, yDest + destHeight * ySrc / srcHeight - bmp.getScaledHeight());
                        cb.addImage(bmp);
                        cb.restoreState();
                    }
                    catch (Exception e) {
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.