Nutrient Web SDK
    Preparing search index...

    Function build

    • Performs processing via Nutrient Backend API.

      In you are running in standalone mode, the resulting ArrayBuffer can be converted to PDF with () (if it's not already PDF) and then loaded with ().

      Parameters

      • authPayload: ProcessingAuthPayload

        Information needed to authenticate processing request with Nutrient backend.

      • instructions: BuildInstructions

        Build API instructions that describe the processing operation.

      • Optionalinputs: BuildInput[]

        An array of all inputs required for the processing operation.

      Returns Promise<ArrayBuffer>

      Promise that resolves to an ArrayBuffer with the processing result. In case of an error, rejects with a NutrientViewer.Error with detailed error message.

      NutrientViewer.build(
      // Authorize request.
      { jwt: authPayload.jwt },
      // Instructions for the processing request.
      {
      parts: [
      // Use first input as the first part of the final document.
      { file: "document" },
      // Use a sample DOCX document served from URL as the second part of the final document.
      {
      file: {
      url: "https://www.nutrient.io/api/downloads/samples/docx/document.docx",
      },
      },
      ],
      },
      // Inputs required by the request. These will be uploaded with the request. The remote file served from URL does not need to be uploaded.
      [{ name: "document", content: document }]
      );

      Document Engine 1.6.0