PdfContentGroup Class
Represents a group of PDF content elements that are independent from the rest of the surrounding elements.
public class PdfContentGroup : PdfVisualContentElement
Public Class PdfContentGroup
Inherits PdfVisualContentElement
- Inheritance:
- System.ObjectPdfContentGroup
- Derived
Properties
Bounds
Gets the upright bounds of the PdfContentGroup.
Property Value
The upright bounds of the PdfContentGroup.
Overrides
Remarks
This member, although exposed as a property for easier debugging, performs complex calculations, so instead of accessing it frequently, cache its result instead.
Elements
Gets the content elements such as text, paths and external objects (images and forms) contained directly in this group.
public PdfContentElementCollection Elements { get; }
Public ReadOnly Property Elements As PdfContentElementCollection
Property Value
The content elements such as text, paths and external objects (images and forms) contained directly in this group.
ElementType
Gets the Group value.
public override PdfContentElementType ElementType { get; }
Public Overrides ReadOnly Property ElementType As PdfContentElementType
Property Value
The Group value.
Overrides
Methods
DrawAnnotation(PdfAnnotation)
Draws the annotation.
public void DrawAnnotation(PdfAnnotation annotation)
Public Sub DrawAnnotation(annotation As PdfAnnotation)
Parameters
annotation
- PdfAnnotation
The annotation to be drawn.
Exceptions
- System.ArgumentNullException
annotation
is null.
DrawAnnotation(PdfAnnotation, PdfMatrix)
Draws the annotation with the specified transformation.
public void DrawAnnotation(PdfAnnotation annotation, PdfMatrix transform)
Public Sub DrawAnnotation(annotation As PdfAnnotation, transform As PdfMatrix)
Parameters
annotation
- PdfAnnotation
The annotation to be drawn.
transform
- PdfMatrix
The transformation from the new (transformed) coordinate system to the original (untransformed) coordinate system.
Exceptions
- System.ArgumentNullException
annotation
is null.
DrawImage(PdfImage, PdfMatrix)
Draws image with the specified transformation.
public void DrawImage(PdfImage image, PdfMatrix transform)
Public Sub DrawImage(image As PdfImage, transform As PdfMatrix)
Parameters
image
- PdfImage
The image to be drawn.
transform
- PdfMatrix
The transformation from the new (transformed) coordinate system to the original (untransformed) coordinate system.
Exceptions
- System.ArgumentNullException
image
is null.
DrawImage(PdfImage, PdfPoint)
Draws image at the specified location.
public void DrawImage(PdfImage image, PdfPoint origin)
Public Sub DrawImage(image As PdfImage, origin As PdfPoint)
Parameters
image
- PdfImage
The image to be drawn.
Exceptions
- System.ArgumentNullException
image
is null.
DrawImage(PdfImage, PdfPoint, PdfSize)
Draws image at the specified location and of the specified size.
public void DrawImage(PdfImage image, PdfPoint origin, PdfSize size)
Public Sub DrawImage(image As PdfImage, origin As PdfPoint, size As PdfSize)
Parameters
image
- PdfImage
The image to be drawn.
Exceptions
- System.ArgumentNullException
image
is null.
DrawText(PdfFormattedText, PdfMatrix)
Draws formatted text with the specified transformation.
public void DrawText(PdfFormattedText formattedText, PdfMatrix transform)
Public Sub DrawText(formattedText As PdfFormattedText, transform As PdfMatrix)
Parameters
formattedText
- PdfFormattedText
The formatted text to be drawn.
transform
- PdfMatrix
The transformation from the new (transformed) coordinate system to the original (untransformed) coordinate system.
Exceptions
- System.ArgumentNullException
formattedText
is null.
DrawText(PdfFormattedText, PdfPoint)
Draws formatted text at the specified location.
public void DrawText(PdfFormattedText formattedText, PdfPoint origin)
Public Sub DrawText(formattedText As PdfFormattedText, origin As PdfPoint)
Parameters
formattedText
- PdfFormattedText
The formatted text to be drawn.
origin
- PdfPoint
The location of the bottom-left corner of the PdfFormattedText.
Exceptions
- System.ArgumentNullException
formattedText
is null.
DrawText(PdfFormattedTextLine, PdfPoint)
Draws formatted text line at the specified location.
public void DrawText(PdfFormattedTextLine formattedTextLine, PdfPoint origin)
Public Sub DrawText(formattedTextLine As PdfFormattedTextLine, origin As PdfPoint)
Parameters
formattedTextLine
- PdfFormattedTextLine
The formatted text line to be drawn.
origin
- PdfPoint
The location of the bottom-left corner of the PdfFormattedTextLine.
Exceptions
- System.ArgumentNullException
formattedTextLine
is null.
GetText()
Gets the snapshot of text contained in this PdfContentGroup using the Default text options.
Returns
The snapshot of text contained in this PdfContentGroup extracted using the Default text options.
Remarks
The PdfText is a snapshot and if the underlying PDF content is changed, that change won't be visible in the PdfText, instead PdfText should be retrieved again to get the actual snapshot.
GetText(PdfTextOptions)
Gets the snapshot of text contained in this PdfContentGroup using the specified text options.
public PdfText GetText(PdfTextOptions options)
Public Function GetText(options As PdfTextOptions) As PdfText
Parameters
options
- PdfTextOptions
The options used for extracting text from this PdfContentGroup.
Returns
The snapshot of text contained in this PdfContentGroup extracted using the specified text options.
Remarks
The PdfText is a snapshot and if the underlying PDF content is changed, that change won't be visible in the PdfText, instead PdfText should be retrieved again to get the actual snapshot.
Exceptions
- System.ArgumentNullException
options
is null.
ToString()
Returns a Unicode text contained in this PdfContentGroup.
Returns
- System.String
A Unicode text contained in this PdfContentGroup.
Overrides
Inherited Properties
Collection | Gets the PdfContentElementCollection that the PdfContentElement belongs to. (Inherited from PdfContentElement) |
Format | Gets or sets the formatting properties applied to the PdfVisualContentElement. (Inherited from PdfVisualContentElement) |
Next | Gets the next PdfContentElement in the Collection. (Inherited from PdfContentElement) |
Previous | Gets the previous PdfContentElement in the Collection. (Inherited from PdfContentElement) |
Transform | Gets or sets the transformation from the new (transformed) coordinate system to the original (untransformed) coordinate system. All coordinates used after the transformation are expressed in the transformed coordinate system. tipBefore setting the Transform, move PdfVisualContentElement into its own PdfContentGroup so that the transformation is confined to that PdfContentGroup and doesn't have any effect on PdfContentElements outside that PdfContentGroup. (Inherited from PdfVisualContentElement) |