Examples of scaleAbsolute()


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

                        Image 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

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

                        Image 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

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

                        Image 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

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

        } catch (IOException ex) {
            Logger.getLogger(BeefReport.class.getName()).log(Level.SEVERE, null, ex);
            System.out.println("Image for logo not found !");
        }
if (img != null) {
     img.scaleAbsolute(100f,90f );
     preface.add(img);
      }
     //title
    preface.add(new Paragraph(title, catFont));
View Full Code Here

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

    rpt.open();
    try
    {
      URL url = mf.getClassLoader().getResource("icons/hibiscus-icon-64x64.png");
      Image image = Image.getInstance(url);
      image.scaleAbsolute(32, 32);
      rpt.add(image);
    }
    catch (Exception e)
    {
      Logger.error("unable to add hibiscus icon, will be ignored", e);
View Full Code Here

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

                        Image 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

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

            - yoffset
          );
        pdfContentByte.restoreState();

        Image image = getPxImage();
        image.scaleAbsolute(availableImageWidth, availableImageHeight);
        chunk = new Chunk(image, 0, 0);
      }

      /*
      image.setAbsolutePosition(
 
View Full Code Here

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

                          Document document) {

        try {
            Image image = Image.getInstance( DroolsDocsBuilder.class.getResource( "drools-guvnor.png" ) );
            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.Image.scaleAbsolute()

                          Document document) {

        try {
            Image image = Image.getInstance( DroolsDocsBuilder.class.getResource( "drools-guvnor.png" ) );
            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.Image.scaleAbsolute()

            //draw the map (at a high resolution as specified above)
            ApplicationGIS.drawMap(drawMapParameter);
            Image img = Image.getInstance(bufferedImage2ByteArray(imageOfRastersOnly));
           
            //scale the image down to fit into the page
            img.scaleAbsolute(mapBoundsInTemplate.width, mapBoundsInTemplate.height);
           
            //set the location of the image
            int left = mapBoundsInTemplate.x;
            int bottom = pageSize.height - mapBoundsInTemplate.height - mapBoundsInTemplate.y;
            img.setAbsolutePosition(left, bottom); //(0,0) is bottom left in the PDF coordinate system
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.