Class PreflightContentStream

java.lang.Object
org.apache.pdfbox.contentstream.PDFStreamEngine
org.apache.pdfbox.preflight.content.PreflightStreamEngine
org.apache.pdfbox.preflight.content.PreflightContentStream

public class PreflightContentStream extends PreflightStreamEngine
  • Field Summary

    Fields inherited from class org.apache.pdfbox.preflight.content.PreflightStreamEngine

    context, processedPage
  • Constructor Summary

    Constructors
    Constructor
    Description
    PreflightContentStream(PreflightContext _context, org.apache.pdfbox.pdmodel.PDPage _page)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    checkShowTextOperators(org.apache.pdfbox.contentstream.operator.Operator operator, List<?> arguments)
    Process Text Validation.
    protected void
    processOperator(org.apache.pdfbox.contentstream.operator.Operator operator, List<org.apache.pdfbox.cos.COSBase> operands)
     
    protected void
    unsupportedOperator(org.apache.pdfbox.contentstream.operator.Operator operator, List<org.apache.pdfbox.cos.COSBase> arguments)
     
    void
    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 Details

    • PreflightContentStream

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

    • 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, List<org.apache.pdfbox.cos.COSBase> operands) throws IOException
      Overrides:
      processOperator in class org.apache.pdfbox.contentstream.PDFStreamEngine
      Throws:
      IOException
    • unsupportedOperator

      protected void unsupportedOperator(org.apache.pdfbox.contentstream.operator.Operator operator, 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, List<?> arguments) throws IOException
      Process Text Validation. Depending on the operator parameter, this will either call validateStringDefinition or validateStringArray.
      Parameters:
      operator -
      arguments -
      Throws:
      IOException
    • validateText

      public void validateText(byte[] string) throws 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:
      IOException