PdfContentFormat Class
Represents a group of formatting properties applied to a PDF content.
- Inheritance:
- System.ObjectPdfContentFormat
Properties
Clip
Gets or sets the formatting properties related to clipping an area.
Property Value
The formatting properties related to clipping an area.
Remarks
The Clip is always applicable to PdfFormContent, is applicable to PdfTextContent and PdfPathContent if IsApplied is true, and is not applicable to any other PdfVisualContentElement.
If the Clip is not applicable, then clip-related graphics state parameters won't be written when writing the associated PdfVisualContentElement to the underlying content stream.
Fill
Gets or sets the formatting properties related to painting an area (filling).
Property Value
The formatting properties related to painting an area (filling).
Remarks
When setting a value, instance of a PdfFillFormat won't actually be stored in the associated PdfVisualContentElement, but the data to which the instance points to will be copied. This enables easy copying of a set of formatting properties from one PdfVisualContentElement to another.
If value that is being set comes from a PdfVisualContentElement that is contained in another PdfDocument, this property setter will automatically clone all PdfContentResources (PdfPatterns, PdfShadings, and PdfColorSpaces) contained in the PdfFillFormat and associate the clones with the current PdfDocument.
The Fill is always applicable to PdfFormContent, is applicable to PdfTextContent and PdfPathContent if IsApplied is true, and is not applicable to any other PdfVisualContentElement. The Opacity is, additionally, applicable to PdfImageContent and PdfShadingContent.
If the Fill is not applicable, then fill-related graphics state parameters won't be written when writing the associated PdfVisualContentElement to the underlying content stream.
See Also
Stroke
Gets or sets the formatting properties related to drawing a line (stroking).
Property Value
The formatting properties related to drawing a line (stroking).
Remarks
When setting a value, instance of a PdfStrokeFormat won't actually be stored in the associated PdfVisualContentElement, but the data to which the instance points to will be copied. This enables easy copying of a set of formatting properties from one PdfVisualContentElement to another.
If value that is being set comes from a PdfVisualContentElement that is contained in another PdfDocument, this property setter will automatically clone all PdfContentResources (PdfPatterns, PdfShadings, and PdfColorSpaces) contained in the PdfStrokeFormat and associate the clones with the current PdfDocument.
The Stroke is always applicable to PdfFormContent, is applicable to PdfTextContent and PdfPathContent if IsApplied is true, and is not applicable to any other PdfVisualContentElement.
If the Stroke is not applicable, then stroke-related graphics state parameters won't be written when writing the associated PdfVisualContentElement to the underlying content stream.
See Also
Text
Gets or sets the text-related formatting properties.
Property Value
The text-related formatting properties.
Remarks
When setting a value, instance of a PdfTextFormat won't actually be stored in the associated PdfVisualContentElement, but the data to which the instance points to will be copied. This enables easy copying of a set of formatting properties from one PdfVisualContentElement to another.
Also, when setting a value on a PdfTextContent, the actual font and size (retrieved with GetFont(out Double) method) remain unchanged because new font might not contain all the necessary information to correctly position, render and/or convert to Unicode all characters of the PdfTextContent. As a workaround, set font and size directly by using SetFont(PdfBasicFont, Double) method.
If value that is being set comes from a PdfVisualContentElement that is contained in another PdfDocument, this property setter will automatically clone all PdfContentResources (PdfBasicFonts) contained in the PdfTextFormat and associate the clones with the current PdfDocument.
The Text is applicable to PdfTextContent and PdfFormContent, and is not applicable to any other PdfVisualContentElement.
If the Text is not applicable, then text-related graphics state parameters won't be written when writing the associated PdfVisualContentElement to the underlying content stream.