Class PdfBoxImage

  • All Implemented Interfaces:
    FSImage

    public class PdfBoxImage
    extends java.lang.Object
    implements FSImage
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] _bytes  
      private float _intrinsicHeight  
      private float _intrinsicWidth  
      private java.lang.String _uri  
      private org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject _xobject  
    • Constructor Summary

      Constructors 
      Constructor Description
      PdfBoxImage​(byte[] image, java.lang.String uri)  
      PdfBoxImage​(byte[] bytes, java.lang.String uri, float width, float height, org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject xobject)  
    • Field Detail

      • _bytes

        private byte[] _bytes
      • _uri

        private final java.lang.String _uri
      • _intrinsicWidth

        private float _intrinsicWidth
      • _intrinsicHeight

        private float _intrinsicHeight
      • _xobject

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

      • PdfBoxImage

        public PdfBoxImage​(byte[] image,
                           java.lang.String uri)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • PdfBoxImage

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

      • 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 java.lang.String getUri()