(s: string)
| 47 | |
| 48 | /** Escape PDF string-literal specials. PURE. */ |
| 49 | export function pdfEscape(s: string): string { |
| 50 | return s.replace(/\\/g, '\\\\').replace(/\(/g, '\\(').replace(/\)/g, '\\)'); |
| 51 | } |
| 52 | |
| 53 | /** Greedy word-wrap by an approximate per-char width (Helvetica avg ~0.5em; Courier 0.6em). PURE. */ |
| 54 | function wrap(text: string, size: number, mono: boolean, widthPts: number): string[] { |
no outgoing calls
no test coverage detected