PDF Web Viewer
    Preparing search index...

    Interface ISetupOptions

    Configuration options for initializing the PDF Editor.

    const result = await PdfEditor({
    license: 'your-license-key',
    container: document.getElementById('editor'),
    workerPath: '/public/workers/',
    onError: (error) => console.error(error),
    });
    interface ISetupOptions {
        brandingConfig?: IBrandingConfig;
        container?: HTMLElement;
        defaultFont?: IDefaultFontConfig;
        fontsPath?: string;
        hideToolsPanel?: boolean;
        i18nPath?: string;
        languageConfig?: ILanguageConfig;
        layoutConfig?: ILayoutConfig;
        license: string;
        onAddSignature?: (appearanceType: AppearanceType) => void;
        onConfigChange?: (config: IConfigChangeData) => void;
        onDownloadFile?: (file: File) => void;
        onError?: (error: Error) => void;
        onLoadingStateChange?: (isLoading: boolean) => void;
        onOpenFile?: () => Promise<void>;
        onPasswordRequired?: IPasswordRequiredCallback;
        onPrint?: (file: File, newTab?: boolean) => void;
        onSendByEmailFile?: (file: File) => void;
        onSnapshotArea?: (blob: Blob) => void;
        proxyUrl?: string;
        stampsPath?: string;
        themeConfig?: IThemeConfig;
        unitsAndGuides?: IUnitsAndGuidesConfig;
        userFonts?: IUserFontData;
        userInitial?: AppearanceModel[];
        userName?: string;
        userSignature?: AppearanceModel[];
        workerPath?: string;
    }
    Index

    Properties

    brandingConfig?: IBrandingConfig

    Branding customization (logo, colors, etc.).

    container?: HTMLElement

    DOM element to render the editor into.

    defaultFont?: IDefaultFontConfig

    Default font configuration.

    fontsPath?: string

    Path to font files.

    hideToolsPanel?: boolean

    If true, hides the tools panel on startup.

    i18nPath?: string

    Path to translation/i18n files.

    languageConfig?: ILanguageConfig

    Language and localization settings.

    layoutConfig?: ILayoutConfig

    Layout customization options.

    license: string

    Your PDF Editor license key (required).

    onAddSignature?: (appearanceType: AppearanceType) => void

    Callback when adding signature or initials.

    onConfigChange?: (config: IConfigChangeData) => void

    Callback when configuration changes.

    onDownloadFile?: (file: File) => void

    Callback when a file is downloaded.

    onError?: (error: Error) => void

    Callback when an error occurs.

    onLoadingStateChange?: (isLoading: boolean) => void

    Callback when loading state changes.

    onOpenFile?: () => Promise<void>

    Callback to handle 'Open File' action.

    onPasswordRequired?: IPasswordRequiredCallback

    Callback when a password is required for a protected PDF.

    onPrint?: (file: File, newTab?: boolean) => void

    Callback when printing.

    onSendByEmailFile?: (file: File) => void

    Callback when sending a file by email.

    onSnapshotArea?: (blob: Blob) => void

    Callback when a snapshot area is captured.

    proxyUrl?: string

    URL of a proxy server for external requests.

    stampsPath?: string

    Path to stamp asset files.

    themeConfig?: IThemeConfig

    Theme configuration (light/dark mode, colors).

    unitsAndGuides?: IUnitsAndGuidesConfig

    Units and guides (ruler, grid) configuration.

    userFonts?: IUserFontData

    Custom fonts to make available in the editor.

    userInitial?: AppearanceModel[]

    Pre-defined initials for Fill & Sign.

    userName?: string

    Display name of the current user for annotations.

    userSignature?: AppearanceModel[]

    Pre-defined signatures for Fill & Sign.

    workerPath?: string

    Path to the PDF worker files (e.g., '/public/workers/').