Skip to content

PDFPageContentAnalysis

Namespace: O2S.Components.PDF4NET.Content.Analyzers

Defines a read-only analyzer of a page's content stream.

public abstract class PDFPageContentAnalysis

Inheritance Object → PDFPageContentAnalysis

Constructors

PDFPageContentAnalysis()

Initializes a new PDFPageContentAnalysis object.

public PDFPageContentAnalysis()

Properties

Context

Gets the transform context.

public PDFContentStreamContainer Context { get; internal set; }

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.

public bool EnableExtendedOperatorInformation { get; set; }

Property Value

Boolean
True if extended operator information should be extracted.


Methods

AnalyzeBeginCompatibilitySectionOperator()

Called when BX operator is found.

public void AnalyzeBeginCompatibilitySectionOperator()

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.

public void AnalyzeBeginMarkedContentOperator(PDFCosName cosTag)

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.

public void AnalyzeBeginTextOperator()

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.

public void AnalyzeCloseFillEvenOddStrokeOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeCloseFillNonZeroStrokeOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeCloseStrokeOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeCloseSubpathOperator()

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.

public void AnalyzeDefineMarkedContentOperator(PDFCosName cosTag)

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.

public void AnalyzeEndCompatibilitySectionOperator()

AnalyzeEndMarkedContentOperator()

Called when EMC operator is found.

public void AnalyzeEndMarkedContentOperator()

AnalyzeEndPathOperator(PDFPathVisualObject)

Called when n operator is found.

public void AnalyzeEndPathOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeEndTextOperator()

AnalyzeFillEvenOddStrokeOperator(PDFPathVisualObject)

Called when B* operator is found.

public void AnalyzeFillEvenOddStrokeOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeFillNonZero2Operator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeFillNonZeroOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeFillNonZeroStrokeOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeFillOddEvenOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeLineToOperator(double x, double y)

Parameters

x Double
X coordinate

y Double
Y coordinate


AnalyzeMoveStartNextTextLineOperator()

Called when T* operator is found.

public void AnalyzeMoveStartNextTextLineOperator()

AnalyzeMoveTextPositionOperator(Double, Double)

Called when Td operator is found.

public void AnalyzeMoveTextPositionOperator(double x, double y)

Parameters

x Double
X offset

y Double
Y offset


AnalyzeMoveTextPositionSetLeadingOperator(Double, Double)

Called when TD operator is found.

public void AnalyzeMoveTextPositionSetLeadingOperator(double x, double y)

Parameters

x Double
X offset

y Double
Y offset


AnalyzeMoveToOperator(Double, Double)

Called when m operator is found.

public void AnalyzeMoveToOperator(double x, double y)

Parameters

x Double
X coordinate

y Double
Y coordinate


AnalyzeRectangleOperator(Double, Double, Double, Double)

Called when re operator is found.

public void AnalyzeRectangleOperator(double x, double y, double width, double height)

Parameters

x Double
X coordinate

y Double
Y coordinate

width Double
Width

height Double
Height


AnalyzeRestoreGraphicsStateOperator()

Called when Q operator is found.

public void AnalyzeRestoreGraphicsStateOperator()

AnalyzeSaveGraphicsStateOperator()

Called when q operator is found.

public void AnalyzeSaveGraphicsStateOperator()

AnalyzeSetCharacterSpacingOperator(Double)

Called when Tc operator is found.

public void AnalyzeSetCharacterSpacingOperator(double value)

Parameters

value Double
Character spacing


AnalyzeSetClipEvenOddOperator(PDFPathVisualObject)

Called when W* operator is found.

public void AnalyzeSetClipEvenOddOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeSetClipNonZeroOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeSetCmykFillOperator(double c, double m, double y, double k)

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.

public void AnalyzeSetCmykStrokeOperator(double c, double m, double y, double k)

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.

public void AnalyzeSetFillColorNOperator(Double[] colorComponents, PDFCosName cosPatternID)

Parameters

colorComponents Double[]
The color components

cosPatternID PDFCosName
ID of the pattern in the Resources dictionary.


AnalyzeSetFillColorOperator(Double[])

Called when sc operator is found.

public void AnalyzeSetFillColorOperator(Double[] colorComponents)

Parameters

colorComponents Double[]
The color components


AnalyzeSetFillColorSpaceOperator(PDFCosName, PDFColorSpace)

Called when cs operator is found.

public void AnalyzeSetFillColorSpaceOperator(PDFCosName cosColorSpaceID, PDFColorSpace colorSpace)

Parameters

cosColorSpaceID PDFCosName
ID of the colorspace in the Resources dictionary.

colorSpace PDFColorSpace
The colorspace object.


AnalyzeSetFlatnessToleranceOperator(Double)

Called when i operator is found.

public void AnalyzeSetFlatnessToleranceOperator(double value)

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.

public void AnalyzeSetGrayFillOperator(double g)

Parameters

g Double
Gray level


AnalyzeSetGrayStrokeOperator(Double)

Called when G operator is found.

public void AnalyzeSetGrayStrokeOperator(double g)

Parameters

g Double
Gray level


AnalyzeSetLineCapOperator(Int32)

Called when J operator is found.

public void AnalyzeSetLineCapOperator(int value)

Parameters

value Int32
Line cap


AnalyzeSetLineDashPatternOperator(Double[], Double)

Called when d operator is found.

public void AnalyzeSetLineDashPatternOperator(Double[] dashPattern, double dashOffset)

Parameters

dashPattern Double[]
The dash pattern.

dashOffset Double
The dash offset.


AnalyzeSetLineJoinOperator(Int32)

Called when j operator is found.

public void AnalyzeSetLineJoinOperator(int value)

Parameters

value Int32
Line join


AnalyzeSetLineWidthOperator(Double)

Called when w operator is found.

public void AnalyzeSetLineWidthOperator(double value)

Parameters

value Double
Line width


AnalyzeSetMiterLimitOperator(Double)

Called when M operator is found.

public void AnalyzeSetMiterLimitOperator(double value)

Parameters

value Double
Miter limit


AnalyzeSetRenderingIntentOperator(PDFCosName)

Called when ri operator is found.

public void AnalyzeSetRenderingIntentOperator(PDFCosName cosRenderingIntent)

Parameters

cosRenderingIntent PDFCosName
The rendering intent.


AnalyzeSetRgbFillOperator(Double, Double, Double)

Called when rg operator is found.

public void AnalyzeSetRgbFillOperator(double r, double g, double b)

Parameters

r Double
Red level

g Double
Green level

b Double
Blue level


AnalyzeSetRgbStrokeOperator(Double, Double, Double)

Called when RG operator is found.

public void AnalyzeSetRgbStrokeOperator(double r, double g, double b)

Parameters

r Double
Red level

g Double
Green level

b Double
Blue level


AnalyzeSetShadingOperator(PDFCosName, PDFCosDictionary)

Called when sh operator is found.

public void AnalyzeSetShadingOperator(PDFCosName cosShadingID, PDFCosDictionary cosShading)

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.

public void AnalyzeSetStrokeColorNOperator(Double[] colorComponents, PDFCosName cosPatternID)

Parameters

colorComponents Double[]
The color components

cosPatternID PDFCosName
ID of the pattern in the Resources dictionary.


AnalyzeSetStrokeColorOperator(Double[])

Called when SC operator is found.

public void AnalyzeSetStrokeColorOperator(Double[] colorComponents)

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.

public void AnalyzeSetTextHorizontalScalingOperator(double value)

Parameters

value Double
Text horizontal scaling


AnalyzeSetTextLeadingOperator(Double)

Called when TL operator is found.

public void AnalyzeSetTextLeadingOperator(double value)

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.

public void AnalyzeSetTextRenderingOperator(int value)

Parameters

value Int32
Text rendering


AnalyzeSetTextRiseOperator(Double)

Called when Ts operator is found.

public void AnalyzeSetTextRiseOperator(double value)

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.

public void AnalyzeSetType3GlyphWidthOperator(double x, double y)

Parameters

x Double
X

y Double
Y


AnalyzeSetWordSpacingOperator(Double)

Called when Tw operator is found.

public void AnalyzeSetWordSpacingOperator(double value)

Parameters

value Double
Word spacing


AnalyzeShowText2Operator(PDFCosArray, PDFTextVisualObject)

Called when TJ operator is found.

public void AnalyzeShowText2Operator(PDFCosArray cosText, PDFTextVisualObject textVisualObject)

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.

public void AnalyzeShowText3Operator(PDFCosString cosText, PDFTextVisualObject textVisualObject)

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.

public void AnalyzeShowTextOperator(PDFCosString cosText, PDFTextVisualObject textVisualObject)

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.

public void AnalyzeStrokeOperator(PDFPathVisualObject pathVisualObject)

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.

public void AnalyzeVCurveToOperator(double x1, double y1, double x2, double y2)

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.

public void AnalyzeYCurveToOperator(double x1, double y1, double x2, double y2)

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.

public void CleanUp()

Setup()

Called before content parsing begins.

public void Setup()