Class PreflightContentStream
java.lang.Object
org.apache.pdfbox.contentstream.PDFStreamEngine
org.apache.pdfbox.preflight.content.PreflightStreamEngine
org.apache.pdfbox.preflight.content.PreflightContentStream
-
Field Summary
Fields inherited from class org.apache.pdfbox.preflight.content.PreflightStreamEngine
context, cosDocument, processedPage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkShowTextOperators
(Operator operator, List<?> arguments) Process Text Validation.protected void
processOperator
(Operator operator, List<COSBase> operands) This is used to handle an operation.protected void
unsupportedOperator
(Operator operator, List<COSBase> arguments) Called when an unsupported operator is encountered.void
Process the validation of a PageContent (The page is initialized by the constructor)void
Process the validation of a Tiling Patternprivate void
validateStringArray
(Operator operator, List<?> arguments) Process Text Validation for the Operands of a TJ operator.private void
validateStringDefinition
(Operator operator, List<?> arguments) Process Text Validation for the Operands of a Tj, "'" and "\"" operator.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
Process the validation of a XObject FormMethods inherited from class org.apache.pdfbox.preflight.content.PreflightStreamEngine
checkColorOperators, checkSetColorSpaceOperators, registerError, registerError, registerError, registerError, validateDefaultColorSpace, validateInlineImageColorSpace, validateInlineImageFilter, validateNumberOfGraphicStates, validateRenderingIntent
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, operatorException, processAnnotation, processChildStream, processOperator, processPage, processSoftMask, processTilingPattern, processTilingPattern, processTransparencyGroup, processType3Stream, registerOperatorProcessor, restoreGraphicsStack, restoreGraphicsState, saveGraphicsStack, saveGraphicsState, setLineDashPattern, setTextLineMatrix, setTextMatrix, showAnnotation, showFontGlyph, showFontGlyph, showForm, showGlyph, showGlyph, showText, showTextString, showTextStrings, showTransparencyGroup, showType3Glyph, showType3Glyph, transformedPoint, transformWidth
-
Constructor Details
-
PreflightContentStream
-
-
Method Details
-
validatePageContentStream
Process the validation of a PageContent (The page is initialized by the constructor)- Throws:
ValidationException
-
validateXObjContentStream
Process the validation of a XObject Form- Parameters:
form
- the PDFormXObject to be validated.- Throws:
ValidationException
-
validatePatternContentStream
Process the validation of a Tiling Pattern- Parameters:
pattern
- the PDTilingPattern to be validated.- Throws:
ValidationException
-
processOperator
Description copied from class:PDFStreamEngine
This is used to handle an operation.- Overrides:
processOperator
in classPDFStreamEngine
- Parameters:
operator
- The operation to perform.operands
- The list of arguments.- Throws:
IOException
- If there is an error processing the operation.
-
unsupportedOperator
Description copied from class:PDFStreamEngine
Called when an unsupported operator is encountered.- Overrides:
unsupportedOperator
in classPDFStreamEngine
- Parameters:
operator
- The unknown operator.arguments
- The list of operands.
-
checkShowTextOperators
Process Text Validation. Depending on the operator parameter, this will either callvalidateStringDefinition
orvalidateStringArray
.- Parameters:
operator
-arguments
-- Throws:
IOException
-
validateStringDefinition
Process Text Validation for the Operands of a Tj, "'" and "\"" operator. If the validation fails for an unexpected reason, a IOException is thrown. If the validation fails due to validation error, a ContentStreamException is thrown. (Use the ValidationError attribute to know the cause)- Parameters:
operator
-arguments
-- Throws:
IOException
-
validateStringArray
Process Text Validation for the Operands of a TJ operator. If the validation fails for an unexpected reason, a IOException is thrown. If the validation fails due to validation error, a ContentStreamException is thrown. (Use the ValidationError attribute to know the cause)- Parameters:
operator
-arguments
-- Throws:
IOException
-
validateText
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
-