public class PreflightContentStream extends PreflightStreamEngine
context, cosDocument, processedPage
Constructor and Description |
---|
PreflightContentStream(PreflightContext _context,
PDPage _page) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkShowTextOperators(Operator operator,
java.util.List<?> arguments)
Process Text Validation.
|
protected void |
processOperator(Operator operator,
java.util.List<COSBase> operands)
This is used to handle an operation.
|
protected void |
unsupportedOperator(Operator operator,
java.util.List<COSBase> arguments)
Called when an unsupported operator is encountered.
|
void |
validatePageContentStream()
Process the validation of a PageContent (The page is initialized by the constructor)
|
void |
validatePatternContentStream(PDTilingPattern pattern)
Process the validation of a Tiling Pattern
|
private void |
validateStringArray(Operator operator,
java.util.List<?> arguments)
Process Text Validation for the Operands of a TJ operator.
|
private void |
validateStringDefinition(Operator operator,
java.util.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 |
validateXObjContentStream(PDFormXObject form)
Process the validation of a XObject Form
|
checkColorOperators, checkSetColorSpaceOperators, registerError, registerError, registerError, registerError, validateDefaultColorSpace, validateInlineImageColorSpace, validateInlineImageFilter, validateNumberOfGraphicStates, validateRenderingIntent
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, showForm, showGlyph, showText, showTextString, showTextStrings, showTransparencyGroup, showType3Glyph, transformedPoint, transformWidth
public PreflightContentStream(PreflightContext _context, PDPage _page)
public void validatePageContentStream() throws ValidationException
ValidationException
public void validateXObjContentStream(PDFormXObject form) throws ValidationException
form
- the PDFormXObject to be validated.ValidationException
public void validatePatternContentStream(PDTilingPattern pattern) throws ValidationException
pattern
- the PDTilingPattern to be validated.ValidationException
protected void processOperator(Operator operator, java.util.List<COSBase> operands) throws java.io.IOException
PDFStreamEngine
processOperator
in class PDFStreamEngine
operator
- The operation to perform.operands
- The list of arguments.java.io.IOException
- If there is an error processing the operation.protected void unsupportedOperator(Operator operator, java.util.List<COSBase> arguments)
PDFStreamEngine
unsupportedOperator
in class PDFStreamEngine
operator
- The unknown operator.arguments
- The list of operands.protected void checkShowTextOperators(Operator operator, java.util.List<?> arguments) throws java.io.IOException
validateStringDefinition
or validateStringArray
.operator
- arguments
- java.io.IOException
private void validateStringDefinition(Operator operator, java.util.List<?> arguments) throws java.io.IOException
operator
- arguments
- java.io.IOException
private void validateStringArray(Operator operator, java.util.List<?> arguments) throws java.io.IOException
operator
- arguments
- java.io.IOException
public void validateText(byte[] string) throws java.io.IOException
string
- java.io.IOException