Add international text
add_international_textGenerate PDFs with text in any of 24 scripts, including Arabic, Hebrew, CJK, and more, with automatic complex-script shaping, BiDi reordering, and color emoji support.
Instructions
Generate a PDF rendering text in any of 24 scripts (Arabic, Hebrew, Thai, CJK, Devanagari, Bengali, Tamil, Telugu, Sinhala, Tibetan, Khmer, Myanmar, Ethiopic, Cyrillic, Greek, Georgian, Armenian, Vietnamese, Turkish, Polish, Latin fallback) with optional COLRv1 colour emoji and mathematical / technical symbols (the "math" font — Noto Sans Math, ∀ ∃ √ ∑ ∫ ∞ ± ÷ ×). BiDi reordering (incl. UAX#9 isolates), Arabic harakat positioning, and complex-script OpenType shaping are handled automatically by the embedded Noto fonts; input is NFC-normalised for maximal glyph coverage and embedded newlines auto-split into paragraphs. Pass lang as a single code or an array (e.g. ["ar","emoji"] or ["latin","math"]) for multi-script / symbol runs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | Yes | Language / script identifier. Either a single code (e.g. 'ar'), a comma-separated list ('ar,emoji'), or an array (['ar','emoji']). Multiple codes enable multi-font run splitting (script + emoji + Latin fallback). | |
| pdfA | No | Optional PDF/A conformance level. When set, Tagged PDF + sRGB OutputIntent + XMP metadata are emitted; the 'latin' Noto Sans fallback is auto-registered for non-WinAnsi Latin (ISO 19005-1 §6.3.4). See docs/guides/PDFA.md for the full authoring guide. | |
| title | Yes | PDF title (rendered as page heading and stored as document metadata). | |
| normalize | No | Unicode normalization form applied before shaping. Defaults to 'NFC' (recommended for international scripts: composes decomposed sequences for the widest glyph coverage). Override with 'NFD'/'NFKC'/'NFKD' only for specialised needs. | |
| outputMode | No | base64 | |
| outputPath | No | ||
| paragraphs | Yes | Ordered list of paragraphs to render in the chosen script. | |
| viewerPreferences | No | Reader presentation hints (catalog /PageLayout, /PageMode, /ViewerPreferences). PDF/A-safe; all optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| filePath | No | Absolute sandboxed file path (when mode='file'). | |
| sizeBytes | Yes |