Configuration
Chrome Options
Use full or minimal chrome, theme overrides, locale-aware text, and locale-inferred direction.
chrome configuration
PapyriumLoadConfiguration supports:
chrome: truechrome: 'full' | 'minimal'chrome: { mode, theme }
Full vs minimal
full: full chrome controls and sidebar behavior.minimal: reduced chrome presentation.
await load({
container: '#viewer',
document: pdfBytes,
chrome: {
mode: 'full',
theme: 'dark',
},
});
papyrium chrome does not persist annotations to browser storage.
If you need persistence, handle it in your app wrapper (for example, listen to annotations.change and store only app-managed annotations).
Locale and i18n
When using chrome, locale is resolved through resolveChromeI18n when supported.
Supported chrome locales:
en-gbpt-ptfr-fres-esde-deel-grja-jpfa-irar-sazh-cnhi-inbn-bdru-ruur-pkid-idpa-insw-ketr-trvi-vn
Direction behavior:
fa-ir,ar-sa, andur-pkresolve tortl.ja-jp, the existing European locales, and all other supported locales resolve toltr.- Unsupported locale values fall back to
ltr. - Direction is inferred from locale only. There is no separate
directionconfiguration field. - Direction updates apply at load time and when
setLocale(...)is called at runtime.
Example: locale-driven direction
const instance = await load({
container: '#viewer',
document: pdfBytes,
chrome: 'full',
locale: 'ja-jp',
});
await instance.setLocale('fa-ir');