Class PreflightContentStream

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkShowTextOperators​(org.apache.pdfbox.contentstream.operator.Operator operator, java.util.List<?> arguments)
      Process Text Validation.
      protected void processOperator​(org.apache.pdfbox.contentstream.operator.Operator operator, java.util.List<org.apache.pdfbox.cos.COSBase> operands)  
      protected void unsupportedOperator​(org.apache.pdfbox.contentstream.operator.Operator operator, java.util.List<org.apache.pdfbox.cos.COSBase> arguments)  
      void validatePageContentStream()
      Process the validation of a PageContent (The page is initialized by the constructor)
      void validatePatternContentStream​(org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPattern pattern)
      Process the validation of a Tiling Pattern
      void validateText​(byte[] string)
      Process the validation of a Text operand contains in a ContentStream This validation checks that : The font isn't missing if the Rendering Mode isn't 3 The font metrics are consistent All character used in the text are defined in the font program.
      void validateXObjContentStream​(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject form)
      Process the validation of a XObject Form
      • 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
      • Methods inherited from class java.lang.Object

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

      • PreflightContentStream

        public PreflightContentStream​(PreflightContext _context,
                                      org.apache.pdfbox.pdmodel.PDPage _page)
    • Method Detail

      • validatePageContentStream

        public void validatePageContentStream()
                                       throws ValidationException
        Process the validation of a PageContent (The page is initialized by the constructor)
        Throws:
        ValidationException
      • validateXObjContentStream

        public void validateXObjContentStream​(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject form)
                                       throws ValidationException
        Process the validation of a XObject Form
        Parameters:
        form - the PDFormXObject to be validated.
        Throws:
        ValidationException
      • validatePatternContentStream

        public void validatePatternContentStream​(org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPattern pattern)
                                          throws ValidationException
        Process the validation of a Tiling Pattern
        Parameters:
        pattern - the PDTilingPattern to be validated.
        Throws:
        ValidationException
      • processOperator

        protected void processOperator​(org.apache.pdfbox.contentstream.operator.Operator operator,
                                       java.util.List<org.apache.pdfbox.cos.COSBase> operands)
                                throws java.io.IOException
        Overrides:
        processOperator in class org.apache.pdfbox.contentstream.PDFStreamEngine
        Throws:
        java.io.IOException
      • unsupportedOperator

        protected void unsupportedOperator​(org.apache.pdfbox.contentstream.operator.Operator operator,
                                           java.util.List<org.apache.pdfbox.cos.COSBase> arguments)
        Overrides:
        unsupportedOperator in class org.apache.pdfbox.contentstream.PDFStreamEngine
      • checkShowTextOperators

        protected void checkShowTextOperators​(org.apache.pdfbox.contentstream.operator.Operator operator,
                                              java.util.List<?> arguments)
                                       throws java.io.IOException
        Process Text Validation. Depending on the operator parameter, this will either call validateStringDefinition or validateStringArray.
        Parameters:
        operator -
        arguments -
        Throws:
        java.io.IOException
      • validateText

        public void validateText​(byte[] string)
                          throws java.io.IOException
        Process the validation of a Text operand contains in a ContentStream This validation checks that :
        • The font isn't missing if the Rendering Mode isn't 3
        • The font metrics are consistent
        • All character used in the text are defined in the font program.
        Parameters:
        string -
        Throws:
        java.io.IOException