GdPicture.NET.14.API
GdPicture14 Namespace / GdPicturePDF Class / SetTextUnderlineStyle Method
A member of the PDFTextUnderlineStyle enumeration.
Example





SetTextUnderlineStyle Method (GdPicturePDF)
Sets text underline style for all subsequent text drawing operations if the PdfTextDecorationStyle.Underline is used.
Syntax
'Declaration
 
Public Function SetTextUnderlineStyle( _
   ByVal TextUnderlineStyle As PdfTextUnderlineStyle _
) As GdPictureStatus
 

Parameters

TextUnderlineStyle
A member of the PDFTextUnderlineStyle enumeration.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

We strongly recommend always checking this status first.

Remarks
This method is only allowed for use with non-encrypted documents.
Example
How to draw underline text on the newly created page.
Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.NewPDF()
    gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4)
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
    Dim fontResName As String = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelvetica)
    gdpicturePDF.SetTextDecorationStyle(PdfTextDecorationStyle.Underline)
    gdpicturePDF.SetTextUnderlineStyle(PdfTextUnderlineStyle.Single)
    gdpicturePDF.SetTextUnderlineColor(255, 0, 0)
    gdpicturePDF.SetTextUnderlineWidth(2)
    gdpicturePDF.DrawRotatedText(fontResName, 100, 100, "This is rotated underlined text!", 15)
    gdpicturePDF.SaveToFile("output.pdf")
End Using
See Also