Class PdfBoxImage

java.lang.Object
com.openhtmltopdf.pdfboxout.PdfBoxImage
All Implemented Interfaces:
FSImage

public class PdfBoxImage extends Object implements FSImage
  • Field Details

    • _bytes

      private byte[] _bytes
    • _uri

      private final String _uri
    • _intrinsicWidth

      private float _intrinsicWidth
    • _intrinsicHeight

      private float _intrinsicHeight
    • _xobject

      private org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject _xobject
  • Constructor Details

    • PdfBoxImage

      public PdfBoxImage(byte[] image, String uri) throws IOException
      Throws:
      IOException
    • PdfBoxImage

      public PdfBoxImage(byte[] bytes, String uri, float width, float height, org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject xobject)
  • Method Details

    • scaleToOutputResolution

      public FSImage scaleToOutputResolution(float dotsPerPixel)
    • getWidth

      public int getWidth()
      Specified by:
      getWidth in interface FSImage
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface FSImage
    • scale

      public void scale(int width, int height)
      Specified by:
      scale in interface FSImage
    • getBytes

      public byte[] getBytes()
    • clearBytes

      public void clearBytes()
    • getXObject

      public org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject getXObject()
    • setXObject

      public void setXObject(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject xobject)
    • getUri

      public String getUri()