(text: string)
| 291 | * Uses PDFDocEncoding if possible, otherwise UTF-16BE with BOM. |
| 292 | */ |
| 293 | export function encodeTextString(text: string): Uint8Array { |
| 294 | const pdfDoc = encodePdfDocEncoding(text); |
| 295 | |
| 296 | if (pdfDoc !== null) { |
| 297 | return pdfDoc; |
| 298 | } |
| 299 | |
| 300 | return encodeUtf16BE(text); |
| 301 | } |
no test coverage detected