Examples of scaledHeight()


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

      File pdf_file = (File)getValue("destfile");
      RandomAccessFileOrArray odd = new RandomAccessFileOrArray(odd_file.getAbsolutePath());
      RandomAccessFileOrArray even = new RandomAccessFileOrArray(even_file.getAbsolutePath());
      Image img = TiffImage.getTiffImage(odd, 1);
      Document document = new Document(new Rectangle(img.scaledWidth(),
          img.scaledHeight()));
      PdfWriter writer = PdfWriter.getInstance(document,
          new FileOutputStream(pdf_file));
      document.open();
      PdfContentByte cb = writer.getDirectContent();
      int count = Math.max(TiffImage.getNumberOfPages(odd), TiffImage
View Full Code Here

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

              imgOdd.scaledHeight()));
          document.newPage();
          imgOdd.setAbsolutePosition(0, 0);
          cb.addImage(imgOdd);
          document.setPageSize(new Rectangle(imgEven.scaledWidth(),
              imgEven.scaledHeight()));
          document.newPage();
          imgEven.setAbsolutePosition(0, 0);
          cb.addImage(imgEven);

        } catch (Exception e) {
View Full Code Here

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

            cb.lineTo(410, 0);
            cb.stroke();
            if (getValue("front") != null) {
              Image front = (Image)getValue("front");
              front.scaleToFit(370, 525);
              front.setAbsolutePosition(410f + (370f - front.scaledWidth()) / 2f, (525f - front.scaledHeight()) / 2f);
              document.add(front);
            }
            if (getValue("back") != null) {
              Image back = (Image)getValue("back");
              back.scaleToFit(370, 525);
View Full Code Here

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

              document.add(front);
            }
            if (getValue("back") != null) {
              Image back = (Image)getValue("back");
              back.scaleToFit(370, 525);
              back.setAbsolutePosition((370f - back.scaledWidth()) / 2f, (525f - back.scaledHeight()) / 2f);
              document.add(back);
            }
            if (getValue("side") != null) {
              Image side = (Image)getValue("side");
              side.scaleToFit(40, 525);
View Full Code Here

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

              document.add(back);
            }
            if (getValue("side") != null) {
              Image side = (Image)getValue("side");
              side.scaleToFit(40, 525);
              side.setAbsolutePosition(370 + (40f - side.scaledWidth()) / 2f, (525f - side.scaledHeight()) / 2f);
              document.add(side);
            }

            // step 5: we close the document
            document.close();
View Full Code Here

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

      if ("ORIGINAL".equals(getValue("pagesize"))) {
        Image img = TiffImage.getTiffImage(ra, 1);
                if (img.getDpiX() > 0 && img.getDpiY() > 0) {
                    img.scalePercent(7200f / img.getDpiX(), 7200f / img.getDpiY());
                }
        document.setPageSize(new Rectangle(img.scaledWidth(), img.scaledHeight()));
        adjustSize = true;
      }
      else if ("LETTER".equals(getValue("pagesize"))) {
        document.setPageSize(PageSize.LETTER);
                width = PageSize.LETTER.width() - 40;
View Full Code Here

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

                    if (img.getDpiX() > 0 && img.getDpiY() > 0) {
                        img.scalePercent(7200f / img.getDpiX(), 7200f / img.getDpiY());
                    }
                  if (adjustSize) {
              document.setPageSize(new Rectangle(img.scaledWidth(),
                  img.scaledHeight()));
                        document.newPage();
                    img.setAbsolutePosition(0, 0);
                  }
                  else {
                    if (img.scaledWidth() > width || img.scaledHeight() > height) {
View Full Code Here

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

                  img.scaledHeight()));
                        document.newPage();
                    img.setAbsolutePosition(0, 0);
                  }
                  else {
                    if (img.scaledWidth() > width || img.scaledHeight() > height) {
                            if (img.getDpiX() > 0 && img.getDpiY() > 0) {
                                float adjx = width / img.scaledWidth();
                                float adjy = height / img.scaledHeight();
                                float adj = Math.min(adjx, adjy);
                                img.scalePercent(7200f / img.getDpiX() * adj, 7200f / img.getDpiY() * adj);
 
View Full Code Here

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

                  }
                  else {
                    if (img.scaledWidth() > width || img.scaledHeight() > height) {
                            if (img.getDpiX() > 0 && img.getDpiY() > 0) {
                                float adjx = width / img.scaledWidth();
                                float adjy = height / img.scaledHeight();
                                float adj = Math.min(adjx, adjy);
                                img.scalePercent(7200f / img.getDpiX() * adj, 7200f / img.getDpiY() * adj);
                            }
                            else
                                img.scaleToFit(width, height);
View Full Code Here

Examples of playn.core.ImageLayer.scaledHeight()

            StringBuffer text = new StringBuffer();
            for (int tt = 0; tt < 25; tt++) text.append(ii+1);
            StyledText.span(text.toString(), TEXT).render(image.canvas(), 0, 0);
            ImageLayer layer = graphics().createImageLayer(image);
            _group.addAt(layer, 0, y);
            y += layer.scaledHeight();
        }

        return null;
    }
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.