PdfGraphics.MeasureString(String, Font, PdfStringFormat, Single, Single) Method
Measures the specified string when drawn with the specified Font, horizontal and vertical resolutions and format.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v19.1.Drawing.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
text | String | A String to measure. |
font | Font | A Font object that defines the text format of the string. |
format | PdfStringFormat | A PdfStringFormat object that represents formatting information, such as line spacing, for the string. |
dpiX | Single | A Single object that represents the value, in dots per inch, for the horizontal resolution. |
dpiY | Single | A Single object that represents the value, in dots per inch, for the vertical resolution. |
Returns
Type | Description |
---|---|
SizeF | A SizeF structure that represents the measured size of the string. |
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MeasureString(String, Font, PdfStringFormat, Single, Single) method.
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.