Skip to content

Commit 8e1e8d0

Browse files
986770: Revamp of UG contents open-pdf-file and save-pdf-file
1 parent 131b3d9 commit 8e1e8d0

16 files changed

+211
-215
lines changed

Document-Processing/PDF/PDF-Viewer/angular/open-pdf-file/from-amazon-s3.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open PDF file from AWS S3
11+
# Open PDF from AWS S3
1212

13-
PDF Viewer allows to load PDF file from AWS S3 using either the Standalone or Server-backed PDF Viewer. Below are the steps and a sample to demonstrate how to open a PDF from AWS S3.
13+
The Angular PDF Viewer component supports loading PDF files from AWS S3 using either the standalone or the server-backed PDF Viewer. The following steps demonstrate both approaches.
1414

15-
## Using Standalone PDF Viewer
15+
## Using the standalone PDF Viewer
1616

17-
To load a PDF file from AWS S3 in a PDF Viewer, you can follow the steps below.
17+
Follow these steps to load a PDF from AWS S3 in the standalone PDF Viewer.
1818

1919
**Step 1:** Create a PDF Viewer sample in Angular
2020

21-
Follow the instructions provided in this [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF Viewer sample in Angular. This will set up the basic structure of your PDF Viewer application.
21+
Follow the instructions in the getting started guide (Angular) to create a basic PDF Viewer sample: [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started)
2222

2323
**Step 2:** Modify the `src/app/app.component.ts` File in the Angular Project
2424

@@ -28,7 +28,7 @@ Follow the instructions provided in this [link](https://help.syncfusion.com/docu
2828
import * as AWS from 'aws-sdk';
2929
```
3030

31-
2. Configures AWS SDK with the region, access key, and secret access key. This configuration allows the application to interact with AWS services like S3.
31+
2. Configure the AWS SDK with the region, access key, and secret access key so the application can interact with S3.
3232

3333
N> Replace **Your Region** with the actual Region of your AWS S3 account and **Your Access Key** with the actual Access Key of your AWS S3 account and **Your Security Access Key** with the actual Security Access Key of your AWS S3 account.
3434

@@ -40,7 +40,7 @@ AWS.config.update({
4040
});
4141
```
4242

43-
3. Sets the parameters for fetching the PDF document from S3, including the bucket name and file key. Then Uses the getObject method of the S3 instance to retrieve the document. Converts the document data to a Base64 string and loads it into the Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer then load Base64 strikng generated into the viewer.load method.
43+
3. Set parameters for fetching the PDF (bucket name and file key). Use S3.getObject to retrieve the document, convert it to a Base64 string, and pass it to viewer.load.
4444

4545
N> Replace **Your Bucket Name** with the actual Bucket name of your AWS S3 account and **Your Key** with the actual File Key of your AWS S3 account.
4646

@@ -76,13 +76,13 @@ N> The **npm install aws-sdk** package must be installed in your application to
7676

7777
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-aws-s3/tree/master/Open%20and%20Save%20PDF%20in%20AWS%20S3%20using%20Standalone).
7878

79-
## Using Server-Backed PDF Viewer
79+
## Using the server-backed PDF Viewer
8080

81-
To load a PDF file from AWS S3 in a PDF Viewer, you can follow the steps below
81+
Follow these steps to load a PDF from AWS S3 using the server-backed PDF Viewer
8282

8383
**Step 1:** Create a Simple PDF Viewer Sample in Angular
8484

85-
Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF viewer sample in Angular. This will give you a basic setup of the PDF viewer component.
85+
Create a basic PDF Viewer sample by following the getting started guide: [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started)
8686

8787
**Step 2:** Modify the `PdfViewerController.cs` File in the Web Service Project
8888

@@ -183,11 +183,11 @@ public async Task<IActionResult> Load([FromBody] Dictionary<string, string> json
183183
}
184184
```
185185

186-
N> Replace **Your Access Key from AWS S3**, **Your Secret Key from AWS S3**, and **Your Bucket name from AWS S3** with your actual AWS access key, secret key and bucket name
186+
N> Replace the placeholders with your actual AWS credentials and bucket name: Access Key, Secret Key, and Bucket Name.
187187

188-
**Step 3:** Set the PDF Viewer Properties in Angular PDF viewer component
188+
**Step 3:** Configure the PDF Viewer component
189189

190-
Modify the `serviceUrl` property of the PDF viewer component with the accurate URL of your web service project, replacing `https://localhost:44396/pdfviewer` with the actual URL of your server. Set the `documentPath` property of the PDF viewer component to the desired name of the PDF file you wish to load from AWS S3. Ensure that you correctly pass the document name from the files available in your AWS S3 bucket to the documentPath property.
190+
Set the serviceUrl of the PDF Viewer to your web service endpoint (replace the localhost URL with your server URL). Set the documentPath to the PDF file name to load from AWS S3. Ensure the document name matches an object in your bucket.
191191

192192
```typescript
193193
import { Component, OnInit } from '@angular/core';

Document-Processing/PDF/PDF-Viewer/angular/open-pdf-file/from-azure-active-directory.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open PDF From Azure Active Directory in Viewer
11+
# Open PDF from Azure Active Directory
1212

13-
### **Overview**
13+
### Overview
1414

15-
The Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer allows you to load and save PDF files directly from Azure Active Directory (AAD). Below are the steps to securely load and store PDF documents from and to AAD using the PDF Viewer.
15+
The TypeScript PDF Viewer component supports loading and saving PDF files with Azure Active Directory (AAD). The following steps explain how to securely load and store PDFs using AAD.
1616

17-
### **Steps to Open the PDF File from Azure Active Directory**
17+
### Steps to open a PDF from Azure Active Directory
1818

1919
---
2020

21-
### **Step 1: Register an Application in Azure Active Directory (AAD)**
21+
### Step 1: Register an application in Azure Active Directory (AAD)
2222

2323
1. **Go to the Azure Portal**:
2424
- Navigate to [Azure Portal](https://portal.azure.com).
@@ -40,7 +40,7 @@ The Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer allows you to lo
4040

4141
---
4242

43-
### **Step 2: Create the Azure Storage Account**
43+
### Step 2: Create the Azure Storage account
4444

4545
1. **Create a Storage Account**:
4646
- In the Azure portal, use the search bar to search for **Storage accounts**.
@@ -50,7 +50,7 @@ The Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer allows you to lo
5050

5151
---
5252

53-
### **Step 3: Assign Role to the Application**
53+
### Step 3: Assign a role to the application
5454

5555
1. **Go to your Storage Account**:
5656
- Navigate to **Access control (IAM)** > **Add role assignment** in your Azure Storage Account.
@@ -65,7 +65,7 @@ The Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer allows you to lo
6565
![add-role](../images/add-role.png)
6666
---
6767

68-
### **Step 4: Upload the PDF Document to the Azure Storage Account**
68+
### Step 4: Upload the PDF to Azure Storage
6969

7070
1. **Navigate to Data Storage**:
7171
- In the Azure portal, go to **Data storage** > **Containers**.
@@ -76,7 +76,7 @@ The Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer allows you to lo
7676
![upload-pdf](../images/upload-pdf.png)
7777
---
7878

79-
### **Step 5: Server-Side Configuration**
79+
### Step 5: Server-side configuration
8080

8181
1. **Configure Server-Side Code**:
8282
- Open the server-side application (e.g., ASP.NET Core) and configure the following details in the `PdfViewerController` file:
@@ -91,29 +91,29 @@ The Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer allows you to lo
9191

9292
---
9393

94-
### **Step 6: Client-Side Configuration**
94+
### Step 6: Client-side configuration
9595

96-
1. **Run the Angular Sample**:
96+
1. Run the TypeScript Sample:
9797
- Start the Angular sample that includes the Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer.
9898

99-
2. **Load PDF from AAD**:
100-
- When the user clicks the **Load from AAD** button, the Angular client will make an HTTP request to the server-side API to fetch the PDF from Azure Blob Storage.
99+
2. Load PDF from AAD:
100+
- When the user clicks the Load from AAD button, the JS client will make an HTTP request to the server-side API to fetch the PDF from Azure Blob Storage.
101101
- The server will retrieve the PDF from Azure, convert it to a base64 string, and return it to the client.
102102

103-
3. **Display PDF in the PDF Viewer**:
103+
3. Display PDF in the PDF Viewer:
104104
- Once the base64 string is received, the PDF Viewer will load the PDF using the `viewer.load()` method.
105105

106106
---
107107

108-
### **Step 7: Save the PDF Document to Azure**
108+
### Step 7: Save the PDF to Azure
109109

110110
1. **Save PDF to AAD**:
111111
- The user can click the **Save to AAD** button to upload any modifications to the PDF back to Azure Blob Storage.
112112
- This action sends the modified PDF to the server, where it is converted into a byte array and saved to the specified Azure Blob container.
113113

114114
---
115115

116-
### **Server-Side Code Snippets**
116+
### Server-side code
117117
```cs
118118
string tenantId = "Provide the tenant id here";
119119
string clientId = "Provide the clientid here";
@@ -167,7 +167,7 @@ public async Task<IActionResult> SaveToAAD([FromBody] Dictionary<string, string>
167167

168168
```
169169

170-
### **Client-side Code Snippets**
170+
### Client-side code
171171

172172
```typescript
173173

Document-Processing/PDF/PDF-Viewer/angular/open-pdf-file/from-azure-blob-storage.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open PDF file from Azure Blob Storage
11+
# Open PDF from Azure Blob Storage
1212

13-
Currently, it's possible to load a PDF file from Azure Blob Storage into a PDF Viewer using either the Standalone or Server-backend PDF Viewer. Below are the steps and a sample to demonstrate how to open a PDF from Azure Blob Storage.
13+
The Angular PDF Viewer component supports loading PDF files from Azure Blob Storage using either the standalone or the server-backed PDF Viewer. The following steps demonstrate both approaches.
1414

15-
## Open PDF file from Azure Blob Storage using Standalone PDF Viewer
15+
## Using the standalone PDF Viewer
1616

17-
To load a PDF file from Azure Blob Storage in a PDF Viewer, you can follow the steps below
17+
Follow these steps to load a PDF from Azure Blob Storage in the standalone PDF Viewer.
1818

1919
**Step 1:** Create a Simple PDF Viewer Sample in Angular
2020

21-
Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF viewer sample in Angular. This will give you a basic setup of the PDF viewer component.
21+
Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF Viewer sample in Angular. This will give you a basic setup of the PDF Viewer component.
2222

2323
**Step 2:** Modify the `src/app/app.component.ts` File in the Angular Project
2424

@@ -32,7 +32,7 @@ private containerName: string = "*Your container name in Azure*";
3232
private blobName: string = "*Your Blob name in Azure*";
3333
```
3434

35-
2. Constructs the URL to the PDF in Azure Blob Storage. Calls fetchAndConvertToBase64 to fetch the PDF and convert it to a base64 string. Then Loads the base64 string into the PDF Viewer.
35+
2. Construct the URL to the PDF in Azure Blob Storage. Call fetchAndConvertToBase64 to fetch the PDF and convert it to a base64 string. Then load the base64 string into the PDF Viewer.
3636

3737
```typescript
3838
LoadPdfFromBlob() {
@@ -50,7 +50,7 @@ LoadPdfFromBlob() {
5050
}
5151
```
5252

53-
3. Then it retrieves the PDF file from the given URL and converts the fetched Blob to a base64 string using blobToBase64.
53+
3. Retrieve the PDF from the URL and convert the fetched Blob to a base64 string using blobToBase64.
5454

5555
```typescript
5656
async fetchAndConvertToBase64(url: string): Promise<string | null> {
@@ -70,7 +70,7 @@ async fetchAndConvertToBase64(url: string): Promise<string | null> {
7070
}
7171
```
7272

73-
4. Uses FileReader to convert a Blob to a base64 string. Resolves the promise with the base64 string or rejects it in case of an error.
73+
4. Use FileReader to convert a Blob to a base64 string. Resolve the promise with the base64 string or reject it in case of an error.
7474

7575
```typescript
7676
blobToBase64(blob: Blob): Promise<string> {
@@ -88,13 +88,13 @@ blobToBase64(blob: Blob): Promise<string> {
8888

8989
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-azure-blob-storage).
9090

91-
## Open PDF file from Azure Blob Storage using Server-Backend PDF Viewer
91+
## Using the server-backed PDF Viewer
9292

93-
To load a PDF file from Azure Blob Storage in a PDF Viewer, you can follow the steps below
93+
Follow these steps to load a PDF from Azure Blob Storage using the server-backed PDF Viewer.
9494

9595
**Step 1:** Create a Simple PDF Viewer Sample in Angular
9696

97-
Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF viewer sample in Angular. This will give you a basic setup of the PDF viewer component.
97+
Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF Viewer sample in Angular. This will give you a basic setup of the PDF Viewer component.
9898

9999
**Step 2:** Modify the `PdfViewerController.cs` File in the Web Service Project
100100

@@ -125,7 +125,7 @@ public PdfViewerController(IConfiguration configuration, ILogger<PdfViewerContro
125125
}
126126
```
127127

128-
5. Modify the `Load()` method to load the PDF files from Azure Blob Storage
128+
5. Modify the `Load()` method to load PDF files from Azure Blob Storage.
129129

130130
```csharp
131131

@@ -177,11 +177,11 @@ public IActionResult Load([FromBody] Dictionary<string, string> jsonObject)
177177
}
178178
```
179179

180-
N> Replace **Your Connection string from Azure** with the actual connection string for your Azure Blob Storage account and **Your container name in Azure** with the actual container name
180+
N> Replace the placeholders with your actual values: Azure storage connection string and container name.
181181

182-
**Step 3:** Set the PDF Viewer Properties in Angular PDF viewer component
182+
**Step 3:** Configure the PDF Viewer component
183183

184-
Modify the `serviceUrl` property of the PDF viewer component with the accurate URL of your web service project, replacing `https://localhost:44396/pdfviewer` with the actual URL of your server. Set the `documentPath` property of the PDF viewer component to the desired name of the PDF file you wish to load from Azure Blob Storage. Ensure that you correctly pass the document name from the files available in your azure contanier to the documentPath property.
184+
Set the serviceUrl to your web service endpoint (replace the localhost URL with your server URL). Set documentPath to the PDF file name to load from Azure Blob Storage. Ensure the document name exists in your Azure container.
185185

186186
```typescript
187187
import { Component, OnInit } from '@angular/core';

Document-Processing/PDF/PDF-Viewer/angular/open-pdf-file/from-box-cloud-file-storage.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
22
layout: post
3-
title: Open PDF files from Box cloud file storage in Angular Pdfviewer Component | Syncfusion
4-
description: Learn here all about how to Open PDF files from Box cloud file storage in Syncfusion Angular Pdfviewer component of Syncfusion Essential JS 2 and more.
3+
title: Open PDF from Box cloud storage in Angular PDF Viewer | Syncfusion
4+
description: Learn how to load PDFs from Box cloud storage in the Syncfusion Angular PDF Viewer component.
55
platform: document-processing
66
control: Open PDF files from Box cloud file storage
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open PDF file from Box cloud file storage
11+
# Open PDF from Box cloud storage
1212

13-
To load a PDF file from Box cloud file storage in a PDF Viewer, you can follow the steps below
13+
Follow these steps to load a PDF from Box cloud storage using the server-backed PDF Viewer.
1414

15-
**Step 1** Set up a Box developer account and create a Box application
15+
**Step 1:** Set up a Box developer account and create a Box application
1616

17-
To access Box storage programmatically, you'll need a developer account with Box. Go to the [Box Developer Console](https://developer.box.com/), sign in or create a new account, and then create a new Box application. This application will provide you with the necessary credentials Client ID and Client Secret to authenticate and access Box APIs. Before accessing files, you need to authenticate your application to access your Box account. Box API supports `OAuth 2.0 authentication` for this purpose.
17+
Create a developer account and Box application in the [Box Developer Console](https://developer.box.com/). Note the Client ID and Client Secret. Use OAuth 2.0 to authenticate the application.
1818

19-
**Step 2:** Create a Simple PDF Viewer Sample in Angular
19+
**Step 2:** Create a PDF Viewer sample in Angular
2020

21-
Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF viewer sample in Angular. This will give you a basic setup of the PDF viewer component.
21+
Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/angular/getting-started) to create a simple PDF Viewer sample in Angular. This will give you a basic setup of the PDF Viewer component.
2222

23-
**Step 3:** Modify the `PdfViewerController.cs` File in the Web Service Project
23+
**Step 3:** Modify the PdfViewerController.cs file in the web service project
2424

2525
1. Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/kb/11063/how-to-create-pdf-viewer-web-service-in-net-core-3-0-and-above) for instructions on how to create a web service project.
2626

@@ -57,7 +57,7 @@ public PdfViewerController(IWebHostEnvironment hostingEnvironment, IMemoryCache
5757

5858
```
5959

60-
5. Modify the `Load()` method to load the PDF files from Box cloud file storage.
60+
5. Modify the Load() method to load PDF files from Box cloud storage.
6161

6262
```csharp
6363

@@ -129,11 +129,11 @@ public async Task<IActionResult> Load([FromBody] Dictionary<string, string> json
129129
}
130130
```
131131

132-
N> replace **Your_Box_Storage_Access_Token** with your actual box access token, and **Your_Folder_ID** with the ID of the folder in your box storage where you want to perform specific operations. Remember to use your valid box API credentials, as **Your_Box_Storage_ClientID** and **Your_Box_Storage_ClientSecret"** are placeholders for your application's API key and secret.
132+
N> Replace the placeholders with your actual Box values: Access Token, Folder ID, Client ID, and Client Secret.
133133

134-
**Step 4:** Set the PDF Viewer Properties in Angular PDF viewer component
134+
**Step 4:** Configure the PDF Viewer component
135135

136-
Modify the `serviceUrl` property of the PDF viewer component with the accurate URL of your web service project, replacing `https://localhost:44396/pdfviewer` with the actual URL of your server. Set the `documentPath` property of the PDF viewer component to the desired name of the PDF file you wish to load from Box cloud file storage. Ensure that you correctly pass the document name from the files available in your box folder to the documentPath property.
136+
Set the serviceUrl to your web service endpoint (replace the localhost URL with your server URL). Set documentPath to the PDF file name to load from Box cloud storage. Ensure the document name exists in your Box folder.
137137

138138
```typescript
139139
import { Component, OnInit } from '@angular/core';
@@ -165,6 +165,6 @@ import { LinkAnnotationService, BookmarkViewService, MagnificationService,
165165

166166
N> The **Box.V2.Core** NuGet package must be installed in your application to use the previous code example.
167167

168-
N> Replace `PDF_Succinctly.pdf` with the actual document name that you want to load from Box cloud file storage. Make sure to pass the document name from the box folder to the `documentPath` property of the PDF viewer component
168+
N> Replace `PDF_Succinctly.pdf` with the actual document name that you want to load from Box cloud storage. Make sure to pass the document name from the Box folder to the `documentPath` property of the PDF Viewer component
169169

170170
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-box-cloud-file-storage)

0 commit comments

Comments
 (0)