(bytes: Uint8Array)
| 172 | * Decode PDF text string bytes (auto-detects encoding). |
| 173 | */ |
| 174 | export function decodeTextString(bytes: Uint8Array): string { |
| 175 | if (hasUtf16BOM(bytes)) { |
| 176 | return decodeUtf16BE(bytes); |
| 177 | } |
| 178 | return decodePdfDocEncoding(bytes); |
| 179 | } |
| 180 | |
| 181 | /** |
| 182 | * Check if a string can be encoded in PDFDocEncoding. |
no test coverage detected