PDFPageContentAnalysis¶
Namespace: O2S.Components.PDF4NET.Content.Analyzers
Defines a read-only analyzer of a page's content stream.
Inheritance Object → PDFPageContentAnalysis
Constructors¶
PDFPageContentAnalysis()¶
Initializes a new PDFPageContentAnalysis object.
Properties¶
Context¶
Gets the transform context.
Property Value
PDFContentStreamContainer
The content stream container on which the transformation is currently applied.
EnableExtendedOperatorInformation¶
Gets or sets a flag indicating whether extended operator information should be extracted when a content stream operator is processed.
Property Value
Boolean
True if extended operator information should be extracted.
Methods¶
AnalyzeBeginCompatibilitySectionOperator()¶
Called when BX operator is found.
AnalyzeBeginImageOperator(PDFCosDictionary, PDFImageVisualObject)¶
Called when BI operator with image is found.
public void AnalyzeBeginImageOperator(PDFCosDictionary cosImage, PDFImageVisualObject imageVisualObject)
Parameters
cosImage PDFCosDictionary
The COS image object.
imageVisualObject PDFImageVisualObject
The image painted by this operator.
Remarks
The imageVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeBeginMarkedContentOperator(PDFCosName)¶
Called when BMC operator is found.
Parameters
cosTag PDFCosName
The tag
AnalyzeBeginMarkedContentPropertyListOperator(PDFCosName, PDFCosDictionary)¶
Called when BDC operator is found.
public void AnalyzeBeginMarkedContentPropertyListOperator(PDFCosName cosTag, PDFCosDictionary cosProperties)
Parameters
cosTag PDFCosName
The tag
cosProperties PDFCosDictionary
The properties dictionary
AnalyzeBeginTextOperator()¶
Called when BT operator is found.
AnalyzeCCurveToOperator(Double, Double, Double, Double, Double, Double)¶
Called when c operator is found.
public void AnalyzeCCurveToOperator(double x1, double y1, double x2, double y2, double x3, double y3)
Parameters
x1 Double
X coordinate of the first control point
y1 Double
Y coordinate of the first control point
x2 Double
X coordinate of the second control point
y2 Double
Y coordinate of the second control point
x3 Double
X coordinate of the third control point
y3 Double
Y coordinate of the third control point
AnalyzeCloseFillEvenOddStrokeOperator(PDFPathVisualObject)¶
Called when b* operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeCloseFillNonZeroStrokeOperator(PDFPathVisualObject)¶
Called when b operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeCloseStrokeOperator(PDFPathVisualObject)¶
Called when s operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeCloseSubpathOperator()¶
Called when h operator is found.
AnalyzeConcatenateMatrixOperator(Double, Double, Double, Double, Double, Double)¶
Called when cm operator is found.
public void AnalyzeConcatenateMatrixOperator(double m11, double m12, double m21, double m22, double tx, double ty)
Parameters
m11 Double
First matrix element
m12 Double
Second matrix element
m21 Double
Third matrix element
m22 Double
Fourth matrix element
tx Double
Fifth matrix element
ty Double
Sixth matrix element
AnalyzeDefineMarkedContentOperator(PDFCosName)¶
Called when MP operator is found.
Parameters
cosTag PDFCosName
The tag
AnalyzeDefineMarkedContentPropertyListOperator(PDFCosName, PDFCosDictionary)¶
Called when DP operator is found.
public void AnalyzeDefineMarkedContentPropertyListOperator(PDFCosName cosTag, PDFCosDictionary cosProperties)
Parameters
cosTag PDFCosName
The tag
cosProperties PDFCosDictionary
The properties dictionary
AnalyzeDisplayFormXObjectOperator(PDFCosName, PDFCosStream)¶
Called when Do operator with form XObject is found.
public void AnalyzeDisplayFormXObjectOperator(PDFCosName cosFormXObjectID, PDFCosStream cosFormXObject)
Parameters
cosFormXObjectID PDFCosName
The ID of the form XObject in the Resources dictionary.
cosFormXObject PDFCosStream
The COS form XObject.
AnalyzeDisplayImageXObjectOperator(PDFCosName, PDFCosStream, PDFImageVisualObject)¶
Called when Do operator with image is found.
public void AnalyzeDisplayImageXObjectOperator(PDFCosName cosImageID, PDFCosStream cosImage, PDFImageVisualObject imageVisualObject)
Parameters
cosImageID PDFCosName
The ID of the image in the Resources dictionary.
cosImage PDFCosStream
The COS image object.
imageVisualObject PDFImageVisualObject
The image painted by this operator.
Remarks
The imageVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeEndCompatibilitySectionOperator()¶
Called when EX operator is found.
AnalyzeEndMarkedContentOperator()¶
Called when EMC operator is found.
AnalyzeEndPathOperator(PDFPathVisualObject)¶
Called when n operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeEndTextOperator()¶
Called when ET operator is found.
AnalyzeFillEvenOddStrokeOperator(PDFPathVisualObject)¶
Called when B* operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeFillNonZero2Operator(PDFPathVisualObject)¶
Called when F operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeFillNonZeroOperator(PDFPathVisualObject)¶
Called when f operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeFillNonZeroStrokeOperator(PDFPathVisualObject)¶
Called when B operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeFillOddEvenOperator(PDFPathVisualObject)¶
Called when f* operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeLineToOperator(Double, Double)¶
Called when l operator is found.
Parameters
x Double
X coordinate
y Double
Y coordinate
AnalyzeMoveStartNextTextLineOperator()¶
Called when T* operator is found.
AnalyzeMoveTextPositionOperator(Double, Double)¶
Called when Td operator is found.
Parameters
x Double
X offset
y Double
Y offset
AnalyzeMoveTextPositionSetLeadingOperator(Double, Double)¶
Called when TD operator is found.
Parameters
x Double
X offset
y Double
Y offset
AnalyzeMoveToOperator(Double, Double)¶
Called when m operator is found.
Parameters
x Double
X coordinate
y Double
Y coordinate
AnalyzeRectangleOperator(Double, Double, Double, Double)¶
Called when re operator is found.
Parameters
x Double
X coordinate
y Double
Y coordinate
width Double
Width
height Double
Height
AnalyzeRestoreGraphicsStateOperator()¶
Called when Q operator is found.
AnalyzeSaveGraphicsStateOperator()¶
Called when q operator is found.
AnalyzeSetCharacterSpacingOperator(Double)¶
Called when Tc operator is found.
Parameters
value Double
Character spacing
AnalyzeSetClipEvenOddOperator(PDFPathVisualObject)¶
Called when W* operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path clipped by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeSetClipNonZeroOperator(PDFPathVisualObject)¶
Called when W operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path clipped by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeSetCmykFillOperator(Double, Double, Double, Double)¶
Called when k operator is found.
Parameters
c Double
Cyan level
m Double
Magenta level
y Double
Yellow level
k Double
Black level
AnalyzeSetCmykStrokeOperator(Double, Double, Double, Double)¶
Called when K operator is found.
Parameters
c Double
Cyan level
m Double
Magenta level
y Double
Yellow level
k Double
Black level
AnalyzeSetFillColorNOperator(Double[], PDFCosName)¶
Called when scn operator is found.
Parameters
colorComponents Double[]
The color components
cosPatternID PDFCosName
ID of the pattern in the Resources dictionary.
AnalyzeSetFillColorOperator(Double[])¶
Called when sc operator is found.
Parameters
colorComponents Double[]
The color components
AnalyzeSetFillColorSpaceOperator(PDFCosName, PDFColorSpace)¶
Called when cs operator is found.
Parameters
cosColorSpaceID PDFCosName
ID of the colorspace in the Resources dictionary.
colorSpace PDFColorSpace
The colorspace object.
AnalyzeSetFlatnessToleranceOperator(Double)¶
Called when i operator is found.
Parameters
value Double
Flatness tolerance
AnalyzeSetGraphicsStateOperator(PDFCosName, PDFCosDictionary)¶
Called when gs operator is found.
public void AnalyzeSetGraphicsStateOperator(PDFCosName cosGraphicsStateID, PDFCosDictionary cosGraphicsState)
Parameters
cosGraphicsStateID PDFCosName
ID of the graphics state in the Resources dictionary.
cosGraphicsState PDFCosDictionary
The graphics state dictionary.
AnalyzeSetGrayFillOperator(Double)¶
Called when g operator is found.
Parameters
g Double
Gray level
AnalyzeSetGrayStrokeOperator(Double)¶
Called when G operator is found.
Parameters
g Double
Gray level
AnalyzeSetLineCapOperator(Int32)¶
Called when J operator is found.
Parameters
value Int32
Line cap
AnalyzeSetLineDashPatternOperator(Double[], Double)¶
Called when d operator is found.
Parameters
dashPattern Double[]
The dash pattern.
dashOffset Double
The dash offset.
AnalyzeSetLineJoinOperator(Int32)¶
Called when j operator is found.
Parameters
value Int32
Line join
AnalyzeSetLineWidthOperator(Double)¶
Called when w operator is found.
Parameters
value Double
Line width
AnalyzeSetMiterLimitOperator(Double)¶
Called when M operator is found.
Parameters
value Double
Miter limit
AnalyzeSetRenderingIntentOperator(PDFCosName)¶
Called when ri operator is found.
Parameters
cosRenderingIntent PDFCosName
The rendering intent.
AnalyzeSetRgbFillOperator(Double, Double, Double)¶
Called when rg operator is found.
Parameters
r Double
Red level
g Double
Green level
b Double
Blue level
AnalyzeSetRgbStrokeOperator(Double, Double, Double)¶
Called when RG operator is found.
Parameters
r Double
Red level
g Double
Green level
b Double
Blue level
AnalyzeSetShadingOperator(PDFCosName, PDFCosDictionary)¶
Called when sh operator is found.
Parameters
cosShadingID PDFCosName
ID of the shading in the Resources dictionary.
cosShading PDFCosDictionary
The shading dictionary.
AnalyzeSetStrokeColorNOperator(Double[], PDFCosName)¶
Called when SCN operator is found.
Parameters
colorComponents Double[]
The color components
cosPatternID PDFCosName
ID of the pattern in the Resources dictionary.
AnalyzeSetStrokeColorOperator(Double[])¶
Called when SC operator is found.
Parameters
colorComponents Double[]
The color components
AnalyzeSetStrokeColorSpaceOperator(PDFCosName, PDFColorSpace)¶
Called when CS operator is found.
public void AnalyzeSetStrokeColorSpaceOperator(PDFCosName cosColorSpaceID, PDFColorSpace colorSpace)
Parameters
cosColorSpaceID PDFCosName
ID of the colorspace in the Resources dictionary.
colorSpace PDFColorSpace
The colorspace object.
AnalyzeSetTextFontAndSizeOperator(PDFCosName, Double, PDFCosDictionary)¶
Called when Tf operator is found.
public void AnalyzeSetTextFontAndSizeOperator(PDFCosName cosFontID, double fontSize, PDFCosDictionary cosFontDictionary)
Parameters
cosFontID PDFCosName
ID of the font object in the Resources dictionary
fontSize Double
The size of the font
cosFontDictionary PDFCosDictionary
The font dictionary
AnalyzeSetTextHorizontalScalingOperator(Double)¶
Called when Tz operator is found.
Parameters
value Double
Text horizontal scaling
AnalyzeSetTextLeadingOperator(Double)¶
Called when TL operator is found.
Parameters
value Double
Text leading
AnalyzeSetTextMatrixOperator(Double, Double, Double, Double, Double, Double)¶
Called when Tm operator is found.
public void AnalyzeSetTextMatrixOperator(double a, double b, double c, double d, double e, double f)
Parameters
a Double
First matrix element
b Double
Second matrix element
c Double
Third matrix element
d Double
Fourth matrix element
e Double
Fifth matrix element
f Double
Sixth matrix element
AnalyzeSetTextRenderingOperator(Int32)¶
Called when Tr operator is found.
Parameters
value Int32
Text rendering
AnalyzeSetTextRiseOperator(Double)¶
Called when Ts operator is found.
Parameters
value Double
Text rise
AnalyzeSetType3GlyphWidthAndBoundingBoxOperator(Double, Double, Double, Double, Double, Double)¶
Called when d1 operator is found.
public void AnalyzeSetType3GlyphWidthAndBoundingBoxOperator(double x, double y, double x1, double y1, double x2, double y2)
Parameters
x Double
y Double
x1 Double
y1 Double
x2 Double
y2 Double
AnalyzeSetType3GlyphWidthOperator(Double, Double)¶
Called when d0 operator is found.
Parameters
x Double
X
y Double
Y
AnalyzeSetWordSpacingOperator(Double)¶
Called when Tw operator is found.
Parameters
value Double
Word spacing
AnalyzeShowText2Operator(PDFCosArray, PDFTextVisualObject)¶
Called when TJ operator is found.
Parameters
cosText PDFCosArray
The COS string
textVisualObject PDFTextVisualObject
The text object displayed by this operator
Remarks
The textVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeShowText3Operator(PDFCosString, PDFTextVisualObject)¶
Called when ' operator is found.
Parameters
cosText PDFCosString
The COS string
textVisualObject PDFTextVisualObject
The text object displayed by this operator
Remarks
The textVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeShowText4Operator(PDFCosString, Double, Double, PDFTextVisualObject)¶
Called when " operator is found.
public void AnalyzeShowText4Operator(PDFCosString cosText, double wordSpacing, double characterSpacing, PDFTextVisualObject textVisualObject)
Parameters
cosText PDFCosString
The COS string
wordSpacing Double
Word spacing
characterSpacing Double
Character spacing
textVisualObject PDFTextVisualObject
The text object displayed by this operator
Remarks
The textVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeShowTextOperator(PDFCosString, PDFTextVisualObject)¶
Called when Tj operator is found.
Parameters
cosText PDFCosString
The COS string
textVisualObject PDFTextVisualObject
The text object displayed by this operator
Remarks
The textVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeStrokeOperator(PDFPathVisualObject)¶
Called when S operator is found.
Parameters
pathVisualObject PDFPathVisualObject
The path painted by this operator.
Remarks
The pathVisualObject parameter is set only when the PDFPageContentAnalysis.EnableExtendedOperatorInformation property is set to true on the analyzer that processes this operator.
AnalyzeVCurveToOperator(Double, Double, Double, Double)¶
Called when v operator is found.
Parameters
x1 Double
X coordinate of the first control point
y1 Double
Y coordinate of the first control point
x2 Double
X coordinate of the second control point
y2 Double
Y coordinate of the second control point
AnalyzeYCurveToOperator(Double, Double, Double, Double)¶
Called when y operator is found.
Parameters
x1 Double
X coordinate of the first control point
y1 Double
Y coordinate of the first control point
x2 Double
X coordinate of the second control point
y2 Double
Y coordinate of the second control point
CleanUp()¶
Called after content parsing ended.
Setup()¶
Called before content parsing begins.