PdfTextData.GetCharCodes Method

Gets character codes for the chunk of text data.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)


public PdfCollection<PdfCharacterCode> GetCharCodes()
Public Function GetCharCodes As PdfCollection(Of PdfCharacterCode)

Return Value

Type: PdfCollection<PdfCharacterCode>
Character codes for the chunk of text data ordered according to the visual order.


Raw PDF strings consist of character codes and define the text to draw. Each PDF string is for one particular font and encoding only. An attempt to use character codes with a font from another PDF string will lead to an unpredictable result.

Character codes are always ordered according to the visual order. I.e., from left to right for horizontal writing mode.

Use DrawString(IEnumerable<PdfCharacterCode>) method to draw text using character codes.

You can also save the text defined by the character codes in an image using a PdfTextRasterizer object.

See Also