pdfrx_web
    Preparing search index...

    Class PdfPageRenderCancellationToken

    Cancels a PdfPage.render that has not started yet.

    Create one with PdfPage.createCancellationToken and pass it as PdfPageRenderOptions.cancellationToken. Cancelling makes render resolve to null. A render already running in the worker cannot be interrupted — it finishes, and its result is discarded.

    A token belongs to a single render; create a new one per call.

    const token = page.createCancellationToken();
    const image = await page.render({ fullWidth, fullHeight, cancellationToken: token });
    if (!image) return; // cancelled (or the document was disposed)
    Index
    • Cancels the render. If it is still queued it never runs and render resolves to null; if the worker already started it, the result is discarded when it arrives. Idempotent.

      Returns void