Class PDFSize


  • public final class PDFSize
    extends java.lang.Object
    Physical size of a PDF page in inches. If the aspect ratio doesn't match the aspect ratio of the page in pixels, margins will be added on both sides of the page image. If 0 is provided for the width or height, it is computed to match the aspect ratio of the image. Eg, for a receipt, we usually use width = 3.54f and height = 0.
    • Constructor Summary

      Constructors 
      Constructor Description
      PDFSize​(double width, double height)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getHeight()  
      double getWidth()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PDFSize

        public PDFSize​(double width,
                       double height)
    • Method Detail

      • getWidth

        public double getWidth()
      • getHeight

        public double getHeight()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object