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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckShowTextOperators(org.apache.pdfbox.contentstream.operator.Operator operator, java.util.List<?> arguments)Process Text Validation.protected voidprocessOperator(org.apache.pdfbox.contentstream.operator.Operator operator, java.util.List<org.apache.pdfbox.cos.COSBase> operands)protected voidunsupportedOperator(org.apache.pdfbox.contentstream.operator.Operator operator, java.util.List<org.apache.pdfbox.cos.COSBase> arguments)voidvalidatePageContentStream()Process the validation of a PageContent (The page is initialized by the constructor)voidvalidatePatternContentStream(org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPattern pattern)Process the validation of a Tiling PatternvoidvalidateText(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.voidvalidateXObjContentStream(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject form)Process the validation of a XObject Form-
Methods inherited from class org.apache.pdfbox.preflight.content.PreflightStreamEngine
checkColorOperators, checkSetColorSpaceOperators, registerError, registerError, registerError, registerError, 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, 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
-
-
-
-
Constructor Detail
-
PreflightContentStream
public PreflightContentStream(PreflightContext _context, org.apache.pdfbox.pdmodel.PDPage _page)
-
-
Method Detail
-
validatePageContentStream
public void validatePageContentStream() throws ValidationExceptionProcess 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 ValidationExceptionProcess 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 ValidationExceptionProcess 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:
processOperatorin classorg.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:
unsupportedOperatorin classorg.apache.pdfbox.contentstream.PDFStreamEngine
-
checkShowTextOperators
protected void checkShowTextOperators(org.apache.pdfbox.contentstream.operator.Operator operator, java.util.List<?> arguments) throws java.io.IOExceptionProcess Text Validation. Depending on the operator parameter, this will either callvalidateStringDefinitionorvalidateStringArray.- Parameters:
operator-arguments-- Throws:
java.io.IOException
-
validateText
public void validateText(byte[] string) throws java.io.IOExceptionProcess 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
-
-