Class RMPDFImageReader

java.lang.Object
com.inductiveautomation.rm.graphics.RMPDFImageReader
All Implemented Interfaces:
RMImageData.ImageReader

public class RMPDFImageReader extends Object implements RMImageData.ImageReader
Provides info for an encapsulated PDF (a PDF used as an image).
  • Constructor Details

    • RMPDFImageReader

      public RMPDFImageReader(RMImageData anImageData)
      Creates a new PDF image reader.
  • Method Details

    • canRead

      public static boolean canRead(String anExt)
      Returns whether PDF image reader can read files with given extension.
    • canRead

      public static boolean canRead(byte[] data)
      Returns whether PDF image reader can read the file provided in the byte array.
    • getPDFFile

      public PDFFile getPDFFile()
      Returns the PDF file for the PDF image data (creating if necessary).
    • readBasicInfo

      public void readBasicInfo(RMImageData anImageData)
      Reads the basic info from PDF data.
      Specified by:
      readBasicInfo in interface RMImageData.ImageReader
    • readImage

      public BufferedImage readImage(RMImageData anImageData)
      Reads the image.
      Specified by:
      readImage in interface RMImageData.ImageReader
    • readBytesDecoded

      public void readBytesDecoded()
      ImageReader method - just a stub, since PDF images don't have image bytes.
      Specified by:
      readBytesDecoded in interface RMImageData.ImageReader
    • paint

      public void paint(RMImageData anImageData, Graphics2D g, double x, double y, double w, double h)
      Draw at maximum resolution. Page is scaled & translated to fit exactly in r.