Class PDFOutput

java.lang.Object
com.inductiveautomation.rm.pdf.writer.PDFOutput
Direct Known Subclasses:
PDFBuffer, PDFOutputStream

public abstract class PDFOutput extends Object
A PDF Output destination. The child classes are responsible for the implementation, but the PDFOutputStream is currently the preferred option to prevent large PDFs from residing in memory unnecessarily.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    append(byte[] theBytes)
    Appends an arbitrary byte array.
    abstract PDFOutput
    append(byte[] theBytes, int anOffset, int aLength)
    Appends an arbitrary byte array with the given offset and length.
    abstract PDFOutput
    append(char aChar)
    Adds a character to the pdf buffer.
    append(double aDouble)
    Adds a double and newline to the pdf buffer.
    append(int anInt)
    Adds an int to the pdf buffer.
    append(RMRect aRect)
    Writes a rect to the pdf buffer.
    append(RMColor aColor)
    Writes a color.
    append(String aString)
    Adds a string to the pdf buffer.
    appendDigits(int anInt, int aPad)
    Appends digits of a whole number (recursively), padded by zeros on the left to the given number of pad digits.
    Adds a newline to the pdf buffer.
    appendln(String aString)
    Adds a string and newline to the pdf buffer.
    void
    curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
    Writes a curveto operator.
    abstract long
    Returns the current length of the output.
    void
    lineTo(float x, float y)
    Writes a lineto operator.
    void
    moveTo(float x, float y)
    Writes a moveto operator.
    void
    Adds a string object ( a string enclosed in parentheses ) to the buffer.
    void
    quadTo(float lastX, float lastY, float x1, float y1, float x2, float y2)
    Writes a quadto operator.
    void
    transform(double a, double b, double c, double d, double tx, double ty)
    Writes a transform to pdf buffer.
    void
    transform(RMTransform aTransform)
    Writes a transform to pdf buffer.
    void
    writePath(Shape aShape)
    Writes a given path to PDF file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PDFOutput

      public PDFOutput()
  • Method Details

    • length

      public abstract long length()
      Returns the current length of the output.
    • append

      public abstract PDFOutput append(char aChar)
      Adds a character to the pdf buffer.
    • append

      public abstract PDFOutput append(byte[] theBytes, int anOffset, int aLength)
      Appends an arbitrary byte array with the given offset and length.
    • append

      public PDFOutput append(String aString)
      Adds a string to the pdf buffer.
    • append

      public PDFOutput append(int anInt)
      Adds an int to the pdf buffer.
    • append

      public PDFOutput append(double aDouble)
      Adds a double and newline to the pdf buffer.
    • append

      public PDFOutput append(RMColor aColor)
      Writes a color.
    • append

      public PDFOutput append(RMRect aRect)
      Writes a rect to the pdf buffer.
    • append

      public PDFOutput append(byte[] theBytes)
      Appends an arbitrary byte array.
    • appendln

      public PDFOutput appendln()
      Adds a newline to the pdf buffer.
    • appendln

      public PDFOutput appendln(String aString)
      Adds a string and newline to the pdf buffer.
    • appendDigits

      public PDFOutput appendDigits(int anInt, int aPad)
      Appends digits of a whole number (recursively), padded by zeros on the left to the given number of pad digits.
    • printPDFString

      public void printPDFString(String aString)
      Adds a string object ( a string enclosed in parentheses ) to the buffer. All chars above the seven bit range are represented by an octal version of the form '\ddd'. The characters '(', ')' and '\' are escaped with backslash.
    • transform

      public void transform(RMTransform aTransform)
      Writes a transform to pdf buffer.
    • transform

      public void transform(double a, double b, double c, double d, double tx, double ty)
      Writes a transform to pdf buffer.
    • writePath

      public void writePath(Shape aShape)
      Writes a given path to PDF file.
    • moveTo

      public void moveTo(float x, float y)
      Writes a moveto operator.
    • lineTo

      public void lineTo(float x, float y)
      Writes a lineto operator.
    • quadTo

      public void quadTo(float lastX, float lastY, float x1, float y1, float x2, float y2)
      Writes a quadto operator.
    • curveTo

      public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
      Writes a curveto operator.