Class PreflightType3Stream


  • public class PreflightType3Stream
    extends PreflightStreamEngine
    This class is used to parse a glyph of a Type3 font program. If the glyph is parsed without error, the width of the glyph is accessible through the getWidth method.
    • Constructor Summary

      Constructors 
      Constructor Description
      PreflightType3Stream​(PreflightContext context, org.apache.pdfbox.pdmodel.PDPage page, org.apache.pdfbox.pdmodel.font.PDType3CharProc charProc)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Image createImage()
      This will parse a type3 stream and create an image from it.
      float getWidth()  
      protected void processOperator​(org.apache.pdfbox.contentstream.operator.Operator operator, java.util.List<org.apache.pdfbox.cos.COSBase> operands)
      This is used to handle an operation.
      void showType3Character​(org.apache.pdfbox.pdmodel.font.PDType3CharProc charProc)  
      • Methods inherited from class org.apache.pdfbox.contentstream.PDFStreamEngine

        addOperator, applyTextAdjustment, beginMarkedContentSequence, beginText, decreaseLevel, endMarkedContentSequence, endText, getAppearance, getCurrentPage, getGraphicsStackSize, getGraphicsState, getInitialMatrix, getLevel, getResources, getTextLineMatrix, getTextMatrix, increaseLevel, isShouldProcessColorOperators, markedContentPoint, operatorException, processAnnotation, processChildStream, processOperator, processPage, processSoftMask, processTilingPattern, processTilingPattern, processTransparencyGroup, processType3Stream, restoreGraphicsStack, restoreGraphicsState, saveGraphicsStack, saveGraphicsState, setLineDashPattern, setTextLineMatrix, setTextMatrix, showAnnotation, showFontGlyph, showForm, showGlyph, showText, showTextString, showTextStrings, showTransparencyGroup, showType3Glyph, transformedPoint, transformWidth, unsupportedOperator
      • Methods inherited from class java.lang.Object

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

      • PreflightType3Stream

        public PreflightType3Stream​(PreflightContext context,
                                    org.apache.pdfbox.pdmodel.PDPage page,
                                    org.apache.pdfbox.pdmodel.font.PDType3CharProc charProc)
    • Method Detail

      • showType3Character

        public void showType3Character​(org.apache.pdfbox.pdmodel.font.PDType3CharProc charProc)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • createImage

        public java.awt.Image createImage()
                                   throws java.io.IOException
        This will parse a type3 stream and create an image from it.
        Returns:
        The image that was created.
        Throws:
        java.io.IOException - If there is an error processing the stream.
      • processOperator

        protected void processOperator​(org.apache.pdfbox.contentstream.operator.Operator operator,
                                       java.util.List<org.apache.pdfbox.cos.COSBase> operands)
                                throws java.io.IOException
        This is used to handle an operation.
        Overrides:
        processOperator in class org.apache.pdfbox.contentstream.PDFStreamEngine
        Parameters:
        operator - The operation to perform.
        operands - The list of arguments.
        Throws:
        java.io.IOException - If there is an error processing the operation.
      • getWidth

        public float getWidth()
        Returns:
        the width of the CharProc glyph description