diff --git a/.gitignore b/.gitignore
index 25c1f5c..9ab20fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,5 @@ open-iconic
.next/
.nuxt/
dist/
-analytics.js
\ No newline at end of file
+analytics.js
+.DS_Store
\ No newline at end of file
diff --git a/biome.json b/biome.json
index b2ae923..2b81f92 100644
--- a/biome.json
+++ b/biome.json
@@ -7,7 +7,8 @@
"./examples/blazor/wasm/wwwroot/css/*",
"./examples/wasm-benchmark/*",
"./examples/asp-net/*",
- "./examples/svelte-kit"
+ "./examples/svelte-kit",
+ "./examples/salesforce/*"
],
"ignoreUnknown": true
},
diff --git a/examples/salesforce/README.md b/examples/salesforce/README.md
index a426fcc..74a16c2 100644
--- a/examples/salesforce/README.md
+++ b/examples/salesforce/README.md
@@ -1,14 +1,20 @@
-# PSPDFKit for Salesforce Integration
+> ⚠️ **Repository Moved**
+> This repository has been moved to https://github.com/PSPDFKit/nutrient-web-examples/tree/main/examples/salesforce.
+> Please update your bookmarks and issues accordingly.
+>
+> This repo is now archived and will no longer receive updates.
+
+# Nutrient Salesforce SDK Integration
## Integrate into a New Salesforce Project as a Lightning Web Component
-PSPDFKit for Salesforce enables you to open PDF, JPG, PNG, and TIFF files inside Salesforce. This unlocks the full functionality of PSPDFKit in Salesforce, including PDF generation, redaction, and signatures.
+Nutrient Salesforce SDK enables you to open PDF, JPG, PNG, and TIFF files inside Salesforce. This unlocks the full functionality of Nutrient Web SDK in Salesforce, including PDF generation, redaction, and signatures.
-This README explains how to integrate PSPDFKit into a new Salesforce project. The integration works as a [Lightning web component (LWC)][lwc] that you can add to any Salesforce organization.
+This README explains how to integrate Nutrient Web SDK into a new Salesforce project. The integration works as a [Lightning web component (LWC)][lwc] that you can add to any Salesforce organization.
-For more information on integrating PSPDFKit into an existing Salesforce project, see the [PSPDFKit for Salesforce documentation][salesforce docs].
+For more information on integrating Nutrient Web SDK into an existing Salesforce project, see the [Nutrient Salesforce SDK documentation][salesforce docs].
-PSPDFKit for Salesforce shares the same APIs as Nutrient Web SDK Standalone. For more information on customizing your Salesforce application, see the [Nutrient Web SDK Standalone documentation][web docs].
+Nutrient Salesforce SDK shares the same APIs as Nutrient Web SDK Standalone. For more information on customizing your Salesforce application, see the [Nutrient Web SDK Standalone documentation][web docs].
## Requirements
@@ -21,17 +27,17 @@ Before continuing, perform all of the following actions:
## Deploying the Package
-To deploy the PSPDFKit package to your Salesforce organization, follow these steps.
+To deploy the Nutrient Web SDK package to your Salesforce organization, follow these steps.
-1. Download the [PSPDFKit for Salesforce project][zip] from GitHub, and then unpack the ZIP file.
+1. Download the [Nutrient Salesforce SDK project][zip] from GitHub, and then unpack the ZIP file.
- Alternatively, run the following terminal command to clone the [PSPDFKit for Salesforce repository][repo] from GitHub:
+ Alternatively, run the following terminal command to clone the [Nutrient Salesforce SDK repository][repo] from GitHub:
```bash
git clone https://github.com/PSPDFKit/salesforce.git
```
-2. In the terminal, go to the PSPDFKit for Salesforce project folder and run the following command to install the PSPDFKit npm module.
+2. In the terminal, go to the Nutrient Salesforce SDK project folder and run the following command to install the Nutrient Web SDK npm module.
Use the following code for npm:
@@ -45,15 +51,15 @@ To deploy the PSPDFKit package to your Salesforce organization, follow these ste
yarn install
```
-3. The PSPDFKit for Salesforce integration example now makes use of the PSPDFKit version available from our CDN at https://cdn.cloud.pspdfkit.com/pspdfkit-web, which means it's no longer limited by Salesforce's upload assets size 5MB limit.
+3. The Nutrient Salesforce SDK integration example now makes use of the Nutrient Web SDK version available from our CDN at https://cdn.cloud.pspdfkit.com/pspdfkit-web, which means it's no longer limited by Salesforce's upload assets size 5MB limit.
-In order to set the PSPDFKit version you want to use, open `./force-app/main/default/pages/PSPDFKit_InitPSPDFKit.page` and edit the line 7 to reflect the PSPDFKit version. For example, in order to use version 2024.4.0, you should change the URL pointing to the CDN to:
+In order to set the Nutrient Web SDK version you want to use, open `./force-app/main/default/pages/Nutrient_InitNutrient.page` and edit the line 7 to reflect the Nutrient Web SDK version. For example, in order to use version 1.0.0, you should change the URL pointing to the CDN to:
```html
-
+
```
- You can find the latest version of Nutrient Web SDK in the [PSPDFKit changelog](https://www.nutrient.io/changelog/web/).
+ You can find the latest version of Nutrient Web SDK in the [Nutrient Web SDK changelog](https://www.nutrient.io/changelog/web/).
4. Run the following command in the terminal to start the Salesforce authentication process:
@@ -63,31 +69,31 @@ In order to set the PSPDFKit version you want to use, open `./force-app/main/def
5. In the browser window that opens, log in to your Salesforce organization and authorize the Salesforce CLI.
-6. In the terminal, run the following command from the PSPDFKit for Salesforce project’s root folder:
+6. In the terminal, run the following command from the Nutrient Salesforce SDK project’s root folder:
```bash
sfdx force:source:deploy -x manifest/package.xml
```
-## Enabling Users to Use PSPDFKit
+## Enabling Users to Use Nutrient Web SDK
-To enable users of your Salesforce organization to use PSPDFKit, follow these steps.
+To enable users of your Salesforce organization to use Nutrient Web SDK, follow these steps.
1. In Salesforce, go to **Users** > **Permission Sets**.
-2. Find **PSPDFKit Admin Access** in the list and click it.
+2. Find **Nutrient Admin Access** in the list and click it.
3. Click **Manage Assignments**.
4. Click **Add Assignment**.
-5. Select the users you want to authorize to use PSPDFKit.
+5. Select the users you want to authorize to use Nutrient.
6. Click **Next**, and then click **Assign**.
## Changing the Security Settings
-PSPDFKit for Salesforce requires Lightning Locker to protect Lightning web components, but Salesforce uses Lightning Web Security by default. To change the default security settings, follow these steps.
+Nutrient Salesforce SDK requires Lightning Locker to protect Lightning web components, but Salesforce uses Lightning Web Security by default. To change the default security settings, follow these steps.
1. In Salesforce, go to **Security** > **Session Settings**.
@@ -95,15 +101,15 @@ PSPDFKit for Salesforce requires Lightning Locker to protect Lightning web compo
3. Scroll down and click **Save**.
-## Using the PSPDFKit for Salesforce Integration
+## Using the Nutrient Salesforce SDK Integration
-To use PSPDFKit in your Salesforce organization, follow these steps.
+To use Nutrient Web SDK in your Salesforce organization, follow these steps.
-1. Ensure you’re logged in as a user authorized to use PSPDFKit.
+1. Ensure you’re logged in as a user authorized to use Nutrient Web SDK.
2. In the top-right corner, open the App Launcher.
-3. Search for and select **PSPDFKit**.
+3. Search for and select **Nutrient**.
4. Click **browse** to upload local PDF files, or open a file from Salesforce.
diff --git a/examples/salesforce/force-app/main/default/classes/PSPDFKitController.cls b/examples/salesforce/force-app/main/default/classes/NutrientController.cls
similarity index 97%
rename from examples/salesforce/force-app/main/default/classes/PSPDFKitController.cls
rename to examples/salesforce/force-app/main/default/classes/NutrientController.cls
index 98621fc..5c23802 100644
--- a/examples/salesforce/force-app/main/default/classes/PSPDFKitController.cls
+++ b/examples/salesforce/force-app/main/default/classes/NutrientController.cls
@@ -1,4 +1,4 @@
-global with sharing class PSPDFKitController {
+global with sharing class NutrientController {
public static contentVersion contVersion{get;set;}
public static String conbase{get;set;}
@@ -47,4 +47,4 @@ global with sharing class PSPDFKitController {
}
}
-}
\ No newline at end of file
+}
diff --git a/examples/salesforce/force-app/main/default/classes/PSPDFKitController.cls-meta.xml b/examples/salesforce/force-app/main/default/classes/NutrientController.cls-meta.xml
similarity index 100%
rename from examples/salesforce/force-app/main/default/classes/PSPDFKitController.cls-meta.xml
rename to examples/salesforce/force-app/main/default/classes/NutrientController.cls-meta.xml
diff --git a/examples/salesforce/force-app/main/default/classes/PSPDFKitControllerTest.cls b/examples/salesforce/force-app/main/default/classes/NutrientControllerTest.cls
similarity index 87%
rename from examples/salesforce/force-app/main/default/classes/PSPDFKitControllerTest.cls
rename to examples/salesforce/force-app/main/default/classes/NutrientControllerTest.cls
index a0441d8..c768cab 100644
--- a/examples/salesforce/force-app/main/default/classes/PSPDFKitControllerTest.cls
+++ b/examples/salesforce/force-app/main/default/classes/NutrientControllerTest.cls
@@ -1,5 +1,5 @@
@IsTest
-public class PSPDFKitControllerTest {
+public class NutrientControllerTest {
@testSetup static void setup() {
Account testAccts = new Account(Name = 'TestAcct');
@@ -27,7 +27,7 @@ public class PSPDFKitControllerTest {
static void testGetAttacmentDetails() {
Account act = [SELECT id FROM Account];
Test.startTest();
- List conDocList = PSPDFKitController.getAttachmentDetails(act.Id);
+ List conDocList = NutrientController.getAttachmentDetails(act.Id);
Test.stopTest();
System.assertEquals(1,conDocList.size());
}
@@ -37,7 +37,7 @@ public class PSPDFKitControllerTest {
Account act = [SELECT id FROM Account];
ContentDocumentLink docLink = [SELECT contentDocumentId From ContentDocumentLink where LinkedEntityId=:act.Id];
Test.startTest();
- Map base64Data = PSPDFKitController.getbase64Data(docLink.contentDocumentId);
+ Map base64Data = NutrientController.getbase64Data(docLink.contentDocumentId);
Test.stopTest();
System.assertEquals(3,base64Data.size());
}
@@ -48,13 +48,13 @@ public class PSPDFKitControllerTest {
ContentDocumentLink docLink = [SELECT contentDocumentId From ContentDocumentLink where LinkedEntityId=:act.Id];
Test.StartTest();
ApexPages.StandardController sc = new ApexPages.StandardController(docLink);
- PSPDFKitController testAccPlan = new PSPDFKitController();
+ NutrientController testAccPlan = new NutrientController();
- PageReference pageRef = Page.PSPDFKit_InitPSPDFKit;
+ PageReference pageRef = Page.Nutrient_InitNutrient;
pageRef.getParameters().put('id', String.valueOf(docLink.contentDocumentId));
Test.setCurrentPage(pageRef);
testAccPlan.getFileDetail();
Test.StopTest();
}
-}
\ No newline at end of file
+}
diff --git a/examples/salesforce/force-app/main/default/classes/PSPDFKitControllerTest.cls-meta.xml b/examples/salesforce/force-app/main/default/classes/NutrientControllerTest.cls-meta.xml
similarity index 100%
rename from examples/salesforce/force-app/main/default/classes/PSPDFKitControllerTest.cls-meta.xml
rename to examples/salesforce/force-app/main/default/classes/NutrientControllerTest.cls-meta.xml
diff --git a/examples/salesforce/force-app/main/default/labels/CustomLabels.labels-meta.xml b/examples/salesforce/force-app/main/default/labels/CustomLabels.labels-meta.xml
index 95e8f6d..62bb285 100644
--- a/examples/salesforce/force-app/main/default/labels/CustomLabels.labels-meta.xml
+++ b/examples/salesforce/force-app/main/default/labels/CustomLabels.labels-meta.xml
@@ -5,6 +5,6 @@
en_UStrueButton label
- Edit File with PSPDFKit
+ Edit File with Nutrient
diff --git a/examples/salesforce/force-app/main/default/lwc/jsconfig.json b/examples/salesforce/force-app/main/default/lwc/jsconfig.json
index f6c5c8d..c613acd 100644
--- a/examples/salesforce/force-app/main/default/lwc/jsconfig.json
+++ b/examples/salesforce/force-app/main/default/lwc/jsconfig.json
@@ -1,12 +1,19 @@
{
- "compilerOptions": {
- "experimentalDecorators": true
- },
- "include": ["**/*", "../../../../.sfdx/typings/lwc/**/*.d.ts"],
- "paths": {
- "c/*": ["*"]
- },
- "typeAcquisition": {
- "include": ["jest"]
- }
+ "compilerOptions": {
+ "experimentalDecorators": true
+ },
+ "include": [
+ "**/*",
+ "../../../../.sfdx/typings/lwc/**/*.d.ts"
+ ],
+ "paths": {
+ "c/*": [
+ "*"
+ ]
+ },
+ "typeAcquisition": {
+ "include": [
+ "jest"
+ ]
+ }
}
diff --git a/examples/salesforce/force-app/main/default/lwc/pspdfkitEditButtonSolution/pspdfkitEditButtonSolution.html b/examples/salesforce/force-app/main/default/lwc/nutrientEditButtonSolution/nutrientEditButtonSolution.html
similarity index 100%
rename from examples/salesforce/force-app/main/default/lwc/pspdfkitEditButtonSolution/pspdfkitEditButtonSolution.html
rename to examples/salesforce/force-app/main/default/lwc/nutrientEditButtonSolution/nutrientEditButtonSolution.html
diff --git a/examples/salesforce/force-app/main/default/lwc/pspdfkitEditButtonSolution/pspdfkitEditButtonSolution.js b/examples/salesforce/force-app/main/default/lwc/nutrientEditButtonSolution/nutrientEditButtonSolution.js
similarity index 60%
rename from examples/salesforce/force-app/main/default/lwc/pspdfkitEditButtonSolution/pspdfkitEditButtonSolution.js
rename to examples/salesforce/force-app/main/default/lwc/nutrientEditButtonSolution/nutrientEditButtonSolution.js
index 9073836..819181c 100644
--- a/examples/salesforce/force-app/main/default/lwc/pspdfkitEditButtonSolution/pspdfkitEditButtonSolution.js
+++ b/examples/salesforce/force-app/main/default/lwc/nutrientEditButtonSolution/nutrientEditButtonSolution.js
@@ -1,6 +1,6 @@
-import Button_label from "@salesforce/label/c.Button_label";
import { LightningElement, api, track } from "lwc";
-export default class PSPDFKitEditButtonSolution extends LightningElement {
+import Button_label from "@salesforce/label/c.Button_label";
+export default class NutrientEditButtonSolution extends LightningElement {
@api recordId;
@api btnColor;
@api newTab = false;
@@ -9,19 +9,19 @@ export default class PSPDFKitEditButtonSolution extends LightningElement {
renderedCallback() {
this.template.querySelector("button").style =
- `background-color:${this.btnColor}`;
+ "background-color:" + this.btnColor;
}
openFileInNewTab() {
- if (this.newTab === true) {
+ if (this.newTab == true) {
this.newWindow = window.open(
- `/apex/PSPDFKit_InitPSPDFKit?id=${this.recordId}`,
- "_blank",
+ "/apex/Nutrient_InitNutrient?id=" + this.recordId,
+ "_blank"
);
} else {
this.newWindow = window.open(
- `/apex/PSPDFKit_InitPSPDFKit?id=${this.recordId}`,
- "_self",
+ "/apex/Nutrient_InitNutrient?id=" + this.recordId,
+ "_self"
);
}
}
diff --git a/examples/salesforce/force-app/main/default/lwc/pspdfkitEditButtonSolution/pspdfkitEditButtonSolution.js-meta.xml b/examples/salesforce/force-app/main/default/lwc/nutrientEditButtonSolution/nutrientEditButtonSolution.js-meta.xml
similarity index 100%
rename from examples/salesforce/force-app/main/default/lwc/pspdfkitEditButtonSolution/pspdfkitEditButtonSolution.js-meta.xml
rename to examples/salesforce/force-app/main/default/lwc/nutrientEditButtonSolution/nutrientEditButtonSolution.js-meta.xml
diff --git a/examples/salesforce/force-app/main/default/lwc/pspdfkitFileSelector/pspdfkitFileSelector.css b/examples/salesforce/force-app/main/default/lwc/nutrientFileSelector/nutrientFileSelector.css
similarity index 100%
rename from examples/salesforce/force-app/main/default/lwc/pspdfkitFileSelector/pspdfkitFileSelector.css
rename to examples/salesforce/force-app/main/default/lwc/nutrientFileSelector/nutrientFileSelector.css
diff --git a/examples/salesforce/force-app/main/default/lwc/pspdfkitFileSelector/pspdfkitFileSelector.html b/examples/salesforce/force-app/main/default/lwc/nutrientFileSelector/nutrientFileSelector.html
similarity index 91%
rename from examples/salesforce/force-app/main/default/lwc/pspdfkitFileSelector/pspdfkitFileSelector.html
rename to examples/salesforce/force-app/main/default/lwc/nutrientFileSelector/nutrientFileSelector.html
index 209d6d6..fc5e788 100644
--- a/examples/salesforce/force-app/main/default/lwc/pspdfkitFileSelector/pspdfkitFileSelector.html
+++ b/examples/salesforce/force-app/main/default/lwc/nutrientFileSelector/nutrientFileSelector.html
@@ -41,7 +41,9 @@