asText

fun asText(): String

Decode as text. Auto-detects UTF-16BE (PDF text-string convention when the first two bytes are 0xFE 0xFF), otherwise falls back to PDFDocEncoding (close enough to latin-1 for the ASCII range; full table is in §D.2).