ComPDFKit Web SDK
    Preparing search index...

    Function printInBackground

    • Prints without the overlay. Resolves once handed to the browser print dialog; rejects when there is no document or rendering fails, and resolves without printing when the user cancels the permission password dialog. Annotations flagged as "no print" are printed too (the engine has no print mode).

      Parameters

      Returns Promise<void>

      A Promise that resolves once the pages are handed to the browser.

      await instance.UI.printInBackground({
      pagesToPrint: [1, 2, 3],
      includeAnnotations: true,
      onProgress: (pageNumber) => console.log(`Rendered page ${pageNumber}`),
      });