Class PDType3CharProc

    • Method Detail

      • getCOSObject

        public COSStream getCOSObject()
        Description copied from interface: COSObjectable
        Convert this standard java object to a COS object.
        Specified by:
        getCOSObject in interface COSObjectable
        Returns:
        The cos object that matches this Java object.
      • getContentStream

        public PDStream getContentStream()
      • getContents

        public java.io.InputStream getContents()
                                        throws java.io.IOException
        Description copied from interface: PDContentStream
        Returns this stream's content, if any.
        Specified by:
        getContents in interface PDContentStream
        Returns:
        An InputStream or null.
        Throws:
        java.io.IOException - If the stream could not be read
      • getGlyphBBox

        public PDRectangle getGlyphBBox()
                                 throws java.io.IOException
        Calculate the bounding box of this glyph. This will work only if the first operator in the stream is d1.
        Returns:
        the bounding box of this glyph, or null if the first operator is not d1.
        Throws:
        java.io.IOException - If an io error occurs while parsing the stream.
      • getMatrix

        public Matrix getMatrix()
        Description copied from interface: PDContentStream
        Returns the matrix which transforms from the stream's space to user space.
        Specified by:
        getMatrix in interface PDContentStream
        Returns:
        the matrix of this stream.
      • getWidth

        public float getWidth()
                       throws java.io.IOException
        Get the width from a type3 charproc stream.
        Returns:
        the glyph width.
        Throws:
        java.io.IOException - if the stream could not be read, or did not have d0 or d1 as first operator, or if their first argument was not a number.
      • parseWidth

        private float parseWidth​(Operator operator,
                                 java.util.List<COSBase> arguments)
                          throws java.io.IOException
        Throws:
        java.io.IOException