public abstract class ContentStreamEngine extends PDFStreamEngine
Modifier and Type | Field and Description |
---|---|
protected Map<String,OperatorProcessor> |
contentStreamEngineOperators |
protected PreflightContext |
context |
protected COSDocument |
cosDocument |
protected PDPage |
processeedPage |
Constructor and Description |
---|
ContentStreamEngine(PreflightContext _context,
PDPage _page) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkColorOperators(String operation)
This method validates if the ColorOperator can be used with the color space defined in OutputIntent dictionaries.
|
protected void |
checkSetColorSpaceOperators(PDFOperator operator,
List<?> arguments)
This method validates if the ColorSpace used as operand is consistent with the color space defined in
OutputIntent dictionaries.
|
protected void |
registerError(String msg,
String errorCode)
Add a validation error into the PreflightContext
|
void |
registerOperatorProcessor(String operator,
OperatorProcessor op)
Register a custom operator processor with the engine.
|
protected void |
validImageColorSpace(PDFOperator operator)
This method validates if the ColorSpace used by the InlinedImage is consistent with the color space defined in
OutputIntent dictionaries.
|
protected void |
validImageFilter(PDFOperator operator)
Throw a ContentStreamException if the LZW filter is used in a InlinedImage.
|
protected void |
validNumberOfGraphicStates(PDFOperator operator)
Valid the number of graphic states if the operator is the Save Graphic state operator ("q")
|
protected void |
validRenderingIntent(PDFOperator operator,
List arguments)
Check operands of the "ri" operator.
|
getColorSpaces, getCurrentPage, getFonts, getGraphicsStack, getGraphicsState, getGraphicsStates, getResources, getTextLineMatrix, getTextMatrix, getTotalCharCnt, getValidCharCnt, getXObjects, inspectFontEncoding, isForceParsing, processEncodedText, processOperator, processOperator, processStream, processSubStream, processTextPosition, resetEngine, setColorSpaces, setFonts, setForceParsing, setGraphicsStack, setGraphicsState, setGraphicsStates, setTextLineMatrix, setTextMatrix
protected PreflightContext context
protected COSDocument cosDocument
protected PDPage processeedPage
protected Map<String,OperatorProcessor> contentStreamEngineOperators
public ContentStreamEngine(PreflightContext _context, PDPage _page)
public final void registerOperatorProcessor(String operator, OperatorProcessor op)
PDFStreamEngine
registerOperatorProcessor
in class PDFStreamEngine
operator
- The operator as a string.op
- Processor instance.protected void validRenderingIntent(PDFOperator operator, List arguments) throws ContentStreamException
operator
- the "ri" operatorarguments
- the "ri" operandsContentStreamException
- ERROR_GRAPHIC_UNEXPECTED_VALUE_FOR_KEY if the operand is invalidprotected void validNumberOfGraphicStates(PDFOperator operator) throws ContentStreamException
operator
- ContentStreamException
protected void validImageFilter(PDFOperator operator) throws ContentStreamException
operator
- the InlinedImage object (BI to EI)ContentStreamException
protected void validImageColorSpace(PDFOperator operator) throws ContentStreamException, IOException
operator
- the InlinedImage object (BI to EI)ContentStreamException
IOException
protected void checkColorOperators(String operation) throws ContentStreamException
operator
- the color operatorContentStreamException
protected void checkSetColorSpaceOperators(PDFOperator operator, List<?> arguments) throws IOException
operator
- arguments
- IOException
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.