Back to Devexpress

PdfStringFormat.GenericDefault Property

officefileapi-devexpress-dot-pdf-dot-pdfstringformat-a40bf41d.md

latest3.0 KB
Original Source

PdfStringFormat.GenericDefault Property

Gets a generic default PdfStringFormat object.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public static PdfStringFormat GenericDefault { get; }
vb
Public Shared ReadOnly Property GenericDefault As PdfStringFormat

Property Value

TypeDescription
PdfStringFormat

The generic default PdfStringFormat object.

|

Remarks

The following table shows initial property values for a generic default instance of the GenericDefault class.

PropertyInitial Value
FormatFlags0
AlignmentNear
LineAlignmentNear
TrimmingCharacter
HotkeyPrefixNone
LeadingMarginFactor1/6
TrailingMarginFactor1/6

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GenericDefault property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

pdf-document-api-add-graphics-to-landscape-and-portrait-pages/CS/CreateGraphics/Program.cs#L35

csharp
DXFont font = new DXFont("Segoe UI", 20, DXFontStyle.Regular);
SizeF textSize = graphics.MeasureString(text, font, PdfStringFormat.GenericDefault, DrawingDpi, DrawingDpi);
PointF topLeft = new PointF(0, 0);

pdf-document-api-add-graphics-to-landscape-and-portrait-pages/VB/CreateGraphics/Program.vb#L30

vb
Dim font As DXFont = New DXFont("Segoe UI", 20, DXFontStyle.Regular)
Dim textSize As SizeF = graphics.MeasureString(text, font, PdfStringFormat.GenericDefault, DrawingDpi, DrawingDpi)
Dim topLeft As PointF = New PointF(0, 0)

See Also

PdfStringFormat Class

PdfStringFormat Members

DevExpress.Pdf Namespace