Document Solutions for PDF
GrapeCity.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Text Namespace / FontSimple Class / TryGetPdfCode Method
The character Unicode.
OUT: The character PDF code.
OUT: The length of pdfCode in bytes.

In This Topic
    TryGetPdfCode Method (FontSimple)
    In This Topic
    Tries to convert a Unicode value to the character's PDF code.

    Note that this method can fail if the font does not contain the necessary info for the conversion or does not contain the specified Unicode value.

    Note also that this method can be slow as it uses large font tables like /Encoding, /ToUnicode etc., so it is recommended that the returned results are cached by the caller.

    Syntax
    'Declaration
     
    Public Overrides Function TryGetPdfCode( _
       ByVal unicode As System.String, _
       ByRef pdfCode As System.UInteger, _
       ByRef pdfCodeLength As System.Integer _
    ) As System.Boolean
    public override System.bool TryGetPdfCode( 
       System.string unicode,
       out System.uint pdfCode,
       out System.int pdfCodeLength
    )

    Parameters

    unicode
    The character Unicode.
    pdfCode
    OUT: The character PDF code.
    pdfCodeLength
    OUT: The length of pdfCode in bytes.

    Return Value

    true if the conversion was successful, false otherwise.
    See Also