Der PSPDFKitLicenseKey-Schlüssel wurde aktualisiert, um den Lizenzcode aus appsettings.json an das Frontend zu übergeben.

This commit is contained in:
Developer 02
2024-05-07 10:14:45 +02:00
parent 79aa6f4cb3
commit b19cccdc34
5 changed files with 11 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ const ActionType = {
}
class App {
constructor(container, envelopeKey, envelopeResponse, documentBytes) {
constructor(container, envelopeKey, envelopeResponse, documentBytes, licenseKey) {
this.container = container
this.envelopeKey = envelopeKey
@@ -24,6 +24,7 @@ class App {
this.signatureCount = 0
this.envelopeResponse = envelopeResponse;
this.documentBytes = documentBytes;
this.licenseKey = licenseKey;
}
// This function will be called from the ShowEnvelope.razor page
@@ -48,7 +49,7 @@ class App {
const arrayBuffer = this.documentBytes
// Load PSPDFKit
this.Instance = await this.UI.loadPSPDFKit(arrayBuffer, this.container)
this.Instance = await this.UI.loadPSPDFKit(arrayBuffer, this.container, this.licenseKey)
this.UI.configurePSPDFKit(this.Instance, this.handleClick.bind(this))
this.Instance.addEventListener(

View File

@@ -14,8 +14,9 @@
// Load the PSPDFKit UI by setting a target element as the container to render in
// and a arraybuffer which represents the document that should be displayed.
loadPSPDFKit(arrayBuffer, container) {
loadPSPDFKit(arrayBuffer, container, licenseKey) {
return PSPDFKit.load({
licenseKey: licenseKey,
styleSheets: ['/css/site.css'],
container: container,
document: arrayBuffer,