PDFCora AI for Web
    Preparing search index...

    Class PdfAI

    The entry point. One instance per document.

    Every feature reports availability separately (AVL-2) and re-checks it on each call (AVL-3), because the user can turn the platform's AI off mid-session.

    Index
    altText: {
        suggest: (
            options?: { pages?: PdfPageRange },
        ) => Promise<PdfAltTextReview>;
    } = ...

    Lists figures in a tagged document that have no alternate text and proposes a description, or decorative marking, for each (ALT). Descriptions need the custom provider. Nothing is written until apply, which returns a new document.

    answers: {
        ask: (
            question: string,
        ) => Promise<PdfAiAvailability | PdfAiResult<PdfAnswer>>;
        availability: () => Promise<PdfAiAvailability>;
    } = ...

    Answers questions from the document, citing the sentences they came from (ANS).

    The web has no on-device prompt API a page can use, so answers need a custom provider.

    diff: {
        compare: (
            revised: PdfDocument,
            options?: PdfDiffOptions,
        ) => Promise<PdfDiff>;
    } = ...

    Compares this document (the original) with a revised version: sentences aligned without a model, and each reworded pair labelled as a change in meaning or wording by the custom provider.

    forms: {
        detect: (
            options?: { pages?: PdfPageRange },
        ) => Promise<PdfDetectedFields>;
        propose: (
            profile: PdfProfile,
            options?: { pages?: PdfPageRange },
        ) => Promise<PdfFormProposals>;
    } = ...

    Proposes values for the document's form fields from a profile the host passes in (FORM). The synonym list runs on every device; the custom provider matches fields it cannot. The profile is not stored. Nothing is written until apply.

    Type Declaration

    redactions: {
        suggest: (options?: PdfRedactionOptions) => Promise<PdfRedactionReview>;
    } = ...

    Suggests likely personal data to redact (RED). Patterns run on every device; the custom provider, when configured, adds names, addresses, dates of birth and ID numbers. Nothing is written until apply.

    remediation: {
        suggest: (
            options?: { pages?: PdfPageRange },
        ) => Promise<PdfRemediationReview>;
    } = ...

    Proposes tags and a reading order for an untagged document (REM), by rules on the page objects, identically on every platform. Nothing is written until apply, which returns a new document; describe its figures with altText afterwards.

    summaries: {
        availability: (language?: string) => Promise<PdfAiAvailability>;
        prepare: (
            onProgress?: (fraction: number) => void,
        ) => Promise<PdfAiAvailability>;
        summarize: (
            options?: PdfSummaryOptions,
        ) => Promise<PdfAiAvailability | PdfAiResult<PdfSummary>>;
    } = ...

    Summarises the document or a page range (SUM).

    Type Declaration

    • get target(): PdfDocument

      The document this instance answers about.

      Returns PdfDocument