You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > PDF Creation > Low-level Functions > PdfGetTextWidth Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.PdfGetTextWidth Method

Calculate the width of the specified text, based on the selected font and font size. The result is measured in current unit defined by the PdfSetMeasurementUnit() function.

C#
public Single PdfGetTextWidth(
    int PdfID, 
    String Text, 
    int FontID, 
    Single FontSize
);
Visual Basic
Public Function PdfGetTextWidth(
    ByVal PdfID As Integer, 
    ByVal Text As String, 
    ByVal FontID As Integer, 
    ByVal FontSize As Single
) As Single
Parameters
Parameters 
Description 
PdfID 
A PDF identifier returned by the PdfNewPdf(), PdfOCRStart(), PdfOcrStartStream(), TwainPDFStart() or TwainPdfStartStream() function. 
Text 
The text to determine the width for.  
FontID 
The Font ID. Value returned by the PdfAddTrueTypeFont() function.  
FontSize 
The font size in point. 1 point = 1/72 inch.  
Returns

The width of the text in current unit defined by the PdfSetMeasurementUnit() function.

What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.