@combeenation/custom-code-sdk
    Preparing search index...

    Function createPdfFromAssets

    • Creates a PDF from one or more assets which will be merged in the given order.

      Consider using createTempPdfFromAssets if the PDF doesn't need to be persisted and isn't relevant for the finished configuration.

      Simplified helper built on top of convertDocument. Use convertDocument directly for advanced scenarios.

      Parameters

      • bundleAliasName: string

        Bundle name where the assets are stored

      • assetTasks: CreatePdfTasks[]

        One or more "assets tasks" which will be merged in the given order

      • cfgnFileName: string

        Name of the generated cfgn file

      • OptionalcfgnFileDisplayName: string

        Optional name which will be used when downloading the file

      Returns Promise<string | undefined>

      URL to the generated cfgn file, if successful

      const resultUrl = await createPdfFromAssets(
      'MyBundle',
      [
      {
      type: 'PdfAsset',
      assetPath: 'quotePdfAsset',
      context: {
      subject: 'MySubject',
      },
      },
      {
      type: 'Asset',
      assetPath: 'Pdf2',
      },
      ],
      'QuotePdf',
      `Your_quote_${new Date().toISOString()}`
      );