UNPKG

gedcom-ts

Version:

TypeScript GEDCOM toolkit for browser apps: import .ged/.zip, edit typed genealogy data, and export GEDCOM or GEDZIP.

36 lines (35 loc) 1.74 kB
import { type DrawGedcomTsLogoOptions } from './booklet-logo'; import type { BookletPersonEntry } from './booklet-person'; import { type BookletTimelineStyle } from './booklet-timeline'; import type { BookletLocale } from './booklet-locale'; import { type BookletDetailLevel } from './booklet-structure'; export interface BookletPdfMeta { readonly title: string; readonly scopeLabel: string; readonly personCount: number; readonly referenceName?: string; } export interface BookletPdfOptions { readonly detailLevel: BookletDetailLevel; readonly timelineStyle: BookletTimelineStyle; /** Booklet narrative language (default English). */ readonly locale?: BookletLocale; /** * Logo gedcom-ts sur la page de couverture (vecteur, inclus dans le paquet). * Défaut : affiché. `false` pour masquer ; sinon options passées à `drawGedcomTsLogoOnPage`. */ readonly coverLogo?: boolean | DrawGedcomTsLogoOptions; /** * Optional TTF/OTF font bytes for Unicode scripts (Arabic, Hebrew, Chinese, etc.). * When omitted, Noto fonts are fetched automatically for `zh`, `ar`, and `he`. */ readonly unicodeFont?: Uint8Array; } export interface PdfTextOptions { /** Keep non-Latin characters (requires a Unicode-capable PDF font). */ readonly preserveUnicode?: boolean; } export declare function preparePdfText(text: string, options?: PdfTextOptions): string; export declare function toPdfText(text: string): string; export declare function generateGenealogyBookletPdf(entries: readonly BookletPersonEntry[], meta: BookletPdfMeta, options: BookletPdfOptions): Promise<Uint8Array>; export declare function downloadBookletPdf(bytes: Uint8Array, filename: string): void;