Nutrient Web SDK
    Preparing search index...

    Function load

    • Creates a new NutrientViewer instance.

      Returns a Promise resolving to a new NutrientViewer.Instance, or rejecting with a NutrientViewer.Error.

      It requires a configuration object. When the configuration is invalid, the promise will be rejected with a NutrientViewer.Error.

      Parameters

      Returns Promise<NutrientViewer.Instance>

      Load Nutrient Web SDK Server

      NutrientViewer.load({
      authPayload: { jwt: "xxx.xxx.xxx" },
      container: ".foo",
      documentId: "85203",
      instant: true,
      }).then((instance) => {
      console.log("Successfully mounted NutrientViewer", instance);
      }).catch((error) => {
      console.error(error.message);
      })

      Load Nutrient Web SDK Standalone

      NutrientViewer.load({
      document: "/sales-report.pdf",
      container: ".foo",
      licenseKey: "YOUR_LICENSE_KEY",
      }).then((instance) => {
      console.log("Successfully mounted NutrientViewer", instance);
      }).catch((error) => {
      console.error(error.message);
      })