Skip to content

Commit 9a11d33

Browse files
Integrated latest changes at 08-05-2024 5:22:30 PM
1 parent f8d1c1d commit 9a11d33

File tree

7 files changed

+282
-6
lines changed

7 files changed

+282
-6
lines changed

ej2-javascript-toc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2963,7 +2963,7 @@
29632963
</ul>
29642964
</li> <li>Release Notes
29652965
<ul>
2966-
<li>2024 Volume 2 - 26.*<ul><li>Weekly Release<ul><li><a href="/ej2-javascript/release-notes/26.2.7">26.2.7</a></li><li><a href="/ej2-javascript/release-notes/26.2.5">26.2.5</a></li><li><a href="/ej2-javascript/release-notes/26.1.42">26.1.42</a></li><li><a href="/ej2-javascript/release-notes/26.1.41">26.1.41</a></li><li><a href="/ej2-javascript/release-notes/26.1.40">26.1.40</a></li><li><a href="/ej2-javascript/release-notes/26.1.39">26.1.39</a></li><li><a href="/ej2-javascript/release-notes/26.1.38">26.1.38</a></li></ul></li><li><a href="/ej2-javascript/release-notes/26.2.4">26.2.4 Service Pack Release</a></li><li><a href="/ej2-javascript/release-notes/26.1.35">26.1.35 Main Release</a></li></ul></li><li>2024 Volume 1 - 25.*<ul><li>Weekly Release<ul><li><a href="/ej2-javascript/release-notes/25.2.7">25.2.7</a></li><li><a href="/ej2-javascript/release-notes/25.2.6">25.2.6</a></li><li><a href="/ej2-javascript/release-notes/25.2.5">25.2.5</a></li><li><a href="/ej2-javascript/release-notes/25.2.4">25.2.4</a></li><li><a href="/ej2-javascript/release-notes/25.1.42">25.1.42</a></li><li><a href="/ej2-javascript/release-notes/25.1.41">25.1.41</a></li><li><a href="/ej2-javascript/release-notes/25.1.40">25.1.40</a></li><li><a href="/ej2-javascript/release-notes/25.1.39">25.1.39</a></li><li><a href="/ej2-javascript/release-notes/25.1.38">25.1.38</a></li><li><a href="/ej2-javascript/release-notes/25.1.37">25.1.37</a></li></ul></li><li><a href="/ej2-javascript/release-notes/25.2.3">25.2.3 Service Pack Release</a></li><li><a href="/ej2-javascript/release-notes/25.1.35">25.1.35 Main Release</a></li></ul></li>
2966+
<li>2024 Volume 2 - 26.*<ul><li>Weekly Release<ul><li><a href="/ej2-javascript/release-notes/26.2.8">26.2.8</a></li><li><a href="/ej2-javascript/release-notes/26.2.7">26.2.7</a></li><li><a href="/ej2-javascript/release-notes/26.2.5">26.2.5</a></li><li><a href="/ej2-javascript/release-notes/26.1.42">26.1.42</a></li><li><a href="/ej2-javascript/release-notes/26.1.41">26.1.41</a></li><li><a href="/ej2-javascript/release-notes/26.1.40">26.1.40</a></li><li><a href="/ej2-javascript/release-notes/26.1.39">26.1.39</a></li><li><a href="/ej2-javascript/release-notes/26.1.38">26.1.38</a></li></ul></li><li><a href="/ej2-javascript/release-notes/26.2.4">26.2.4 Service Pack Release</a></li><li><a href="/ej2-javascript/release-notes/26.1.35">26.1.35 Main Release</a></li></ul></li><li>2024 Volume 1 - 25.*<ul><li>Weekly Release<ul><li><a href="/ej2-javascript/release-notes/25.2.7">25.2.7</a></li><li><a href="/ej2-javascript/release-notes/25.2.6">25.2.6</a></li><li><a href="/ej2-javascript/release-notes/25.2.5">25.2.5</a></li><li><a href="/ej2-javascript/release-notes/25.2.4">25.2.4</a></li><li><a href="/ej2-javascript/release-notes/25.1.42">25.1.42</a></li><li><a href="/ej2-javascript/release-notes/25.1.41">25.1.41</a></li><li><a href="/ej2-javascript/release-notes/25.1.40">25.1.40</a></li><li><a href="/ej2-javascript/release-notes/25.1.39">25.1.39</a></li><li><a href="/ej2-javascript/release-notes/25.1.38">25.1.38</a></li><li><a href="/ej2-javascript/release-notes/25.1.37">25.1.37</a></li></ul></li><li><a href="/ej2-javascript/release-notes/25.2.3">25.2.3 Service Pack Release</a></li><li><a href="/ej2-javascript/release-notes/25.1.35">25.1.35 Main Release</a></li></ul></li>
29672967
<li>2023 Volume 4 - 24.*<ul><li>Weekly Release<ul><li><a href="/ej2-javascript/release-notes/24.2.9">24.2.9</a></li><li><a href="/ej2-javascript/release-notes/24.2.8">24.2.8</a></li><li><a href="/ej2-javascript/release-notes/24.2.7">24.2.7</a></li><li><a href="/ej2-javascript/release-notes/24.2.6">24.2.6</a></li><li><a href="/ej2-javascript/release-notes/24.2.5">24.2.5</a></li><li><a href="/ej2-javascript/release-notes/24.2.4">24.2.4</a></li><li><a href="/ej2-javascript/release-notes/24.1.47">24.1.47</a></li><li><a href="/ej2-javascript/release-notes/24.1.46">24.1.46</a></li><li><a href="/ej2-javascript/release-notes/24.1.45">24.1.45</a></li><li><a href="/ej2-javascript/release-notes/24.1.44">24.1.44</a></li><li><a href="/ej2-javascript/release-notes/24.1.43">24.1.43</a></li></ul></li><li><a href="/ej2-javascript/release-notes/24.2.3">24.2.3 Service Pack Release</a></li><li><a href="/ej2-javascript/release-notes/24.1.41">24.1.41 Main Release</a></li></ul></li>
29682968
<li>2023 Volume 3 - 23.*<ul><li> Weekly Release<ul><li><a href="/ej2-javascript/release-notes/23.2.7">23.2.7</a></li><li><a href="/ej2-javascript/release-notes/23.2.6">23.2.6</a></li><li><a href="/ej2-javascript/release-notes/23.2.5">23.2.5</a></li><li><a href="/ej2-javascript/release-notes/23.1.44">23.1.44</a></li><li><a href="/ej2-javascript/release-notes/23.1.43">23.1.43</a></li><li><a href="/ej2-javascript/release-notes/23.1.42">23.1.42</a></li><li><a href="/ej2-javascript/release-notes/23.1.41">23.1.41</a></li><li><a href="/ej2-javascript/release-notes/23.1.40">23.1.40</a></li><li><a href="/ej2-javascript/release-notes/23.1.39">23.1.39</a></li><li><a href="/ej2-javascript/release-notes/23.1.38">23.1.38</a></li></ul></li><li><a href="/ej2-javascript/release-notes/23.2.4">23.2.4 Service Pack Release</a></li><li><a href="/ej2-javascript/release-notes/23.1.36">23.1.36 Main Release</a></li></ul></li>
29692969
<li>2023 Volume 2 - 22.*
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
3+
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
4+
platform: ej2-javascript
5+
documentation: ug
6+
---
7+
8+
# Essential Studio for ##Platform_Name## Release Notes
9+
10+
{% include release-info.html date="August 06, 2024" version="v26.2.8" %}
11+
12+
{% directory path: _includes/release-notes/v26.2.8 %}
13+
14+
{% include {{file.url}} %}
15+
16+
{% enddirectory %}

ej2-javascript/pdfviewer/js/open-pdf-file/from-dropbox-cloud-file-storage.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,61 @@ domainurl: ##DomainURL##
1111

1212
# Open PDF file from Dropbox cloud file storage
1313

14+
PDF Viewer allows to load PDF file from Drop Box using either the Standalone or Server-backed PDF Viewer. Below are the steps and a sample to demonstrate how to open a PDF from Drop Box.
15+
16+
## Using Standalone PDF Viewer
17+
18+
To load a PDF file from Dropbox cloud file storage in a PDF Viewer, you can follow the steps below
19+
20+
**Step 1** Create a Dropbox API
21+
22+
To create a Dropbox API App, you should follow the official documentation provided by Dropbox [link](https://www.dropbox.com/developers/documentation/dotnet#tutorial). The process involves visiting the Dropbox Developer website and using their App Console to set up your API app. This app will allow you to interact with Dropbox programmatically, enabling secure access to files and data.
23+
24+
**Step 2:** Create a Simple PDF Viewer Sample in JavaScript
25+
26+
Start by following the steps provided in this [link](https://ej2.syncfusion.com/javascript/documentation/pdfviewer/getting-started) to create a simple PDF viewer sample in JavaScript. This will give you a basic setup of the PDF viewer component.
27+
28+
**Step 3:** Modify the `src/app/app.ts` File in the Angular Project
29+
30+
1. Import the required namespaces at the top of the file:
31+
32+
```typescript
33+
import { Dropbox } from 'dropbox';
34+
```
35+
36+
2. Create an instance of the Dropbox class using an access token for authentication. Next, call the filesDownload method of this Dropbox instance to download the file located at /PDF_Succinctly.pdf. Upon successfully downloading the file, extract the file blob from the response. Convert this file blob to a Base64 string using the blobToBase64 method. Finally, load the Base64 string into a PDF viewer control.
37+
38+
N> Replace **Your Access Token** with the actual Access Token of your Drop Box account.
39+
40+
```typescript
41+
pdfviewer.created = function () {
42+
let dbx = new Dropbox({ accessToken: 'Your Access Token' });
43+
dbx.filesDownload({ path: '/PDF_Succinctly.pdf' }).then(async (response) => {
44+
const blob = await (response.result as any).fileBlob;
45+
const base64String = await blobToBase64(blob);
46+
setTimeout(() => {
47+
pdfviewer.load(base64String, "");
48+
}, 2000);
49+
});
50+
}
51+
52+
function blobToBase64(blob: Blob): Promise<string> {
53+
return new Promise((resolve, reject) => {
54+
const reader = new FileReader();
55+
reader.readAsDataURL(blob);
56+
reader.onloadend = () => {
57+
resolve(reader.result as string);
58+
};
59+
});
60+
}
61+
```
62+
63+
N> The **npm install dropbox** package must be installed in your application to use the previous code example.
64+
65+
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage/tree/master/Open%20and%20Save%20PDF%20in%20Drop%20Box%20using%20Standalone)
66+
67+
## Using Server-Backed PDF Viewer
68+
1469
To load a PDF file from Dropbox cloud file storage in a PDF Viewer, you can follow the steps below
1570

1671
**Step 1** Create a Dropbox API
@@ -136,4 +191,4 @@ viewer.load('PDF_Succinctly.pdf', null);
136191

137192
N> The **Dropbox.Api** NuGet package must be installed in your application to use the previous code example.
138193

139-
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage)
194+
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage/tree/master/Open%20and%20Save%20PDF%20in%20Drop%20Box%20using%20Server-Backed)

ej2-javascript/pdfviewer/js/save-pdf-file/to-dropbox-cloud-file-storage.md

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,81 @@ domainurl: ##DomainURL##
1111

1212
# Save PDF file to Dropbox cloud file storage
1313

14+
PDF Viewer allows to load PDF file from Drop Box using either the Standalone or Server-backed PDF Viewer. Below are the steps and a sample to demonstrate how to open a PDF from Drop Box.
15+
16+
## Using Standalone PDF Viewer
17+
18+
To save a PDF file to Dropbox cloud file storage, you can follow the steps below
19+
20+
**Step 1** Create a Dropbox API
21+
22+
To create a Dropbox API App, you should follow the official documentation provided by Dropbox [link](https://www.dropbox.com/developers/documentation/dotnet#tutorial). The process involves visiting the Dropbox Developer website and using their App Console to set up your API app. This app will allow you to interact with Dropbox programmatically, enabling secure access to files and data.
23+
24+
**Step 2:** Create a PDF Viewer sample in JavaScript
25+
26+
Follow the instructions provided in this [link](https://ej2.syncfusion.com/javascript/documentation/pdfviewer/getting-started) to create a simple PDF Viewer sample in JavaScript. This will set up the basic structure of your PDF Viewer application.
27+
28+
**Step 3:** Modify the `src/app/app.ts` File in the Angular Project
29+
30+
1. Import the required namespaces at the top of the file:
31+
32+
```typescript
33+
import { Dropbox } from 'dropbox';
34+
```
35+
36+
2. Configure a custom toolbar item for the download function to save a PDF file in Azure Blob Storage.
37+
38+
```typescript
39+
let toolItem1: CustomToolbarItemModel = {
40+
prefixIcon: 'e-icons e-pv-download-document-icon',
41+
id: 'download_pdf',
42+
tooltipText: 'Download file',
43+
align: 'right'
44+
};
45+
46+
pdfviewer.toolbarSettings = { toolbarItems: [ 'OpenOption', 'PageNavigationTool', 'MagnificationTool', 'PanTool', 'SelectionTool', 'SearchOption', 'PrintOption', toolItem1, 'UndoRedoTool', 'AnnotationEditTool', 'FormDesignerEditTool', 'CommentTool', 'SubmitForm']}
47+
48+
pdfviewer.toolbarClick = function (args) {
49+
if (args.item && args.item.id === 'download_pdf') {
50+
saveDocument();
51+
}
52+
};
53+
```
54+
55+
3. Retrieve the PDF viewer instance and save the current PDF as a Blob. Then, read the Blob using a FileReader to convert it into an ArrayBuffer, and upload the ArrayBuffer to Drop Box using the filesUpload method of the Drop Box instance.
56+
57+
N> Replace **Your Access Token** with the actual Access Token of your Drop Box account.
58+
59+
```typescript
60+
function saveDocument() {
61+
pdfviewer.saveAsBlob().then(function (value) {
62+
var reader = new FileReader();
63+
reader.onload = async () => {
64+
if (reader.result) {
65+
const dbx = new Dropbox({ accessToken: 'Your Access Token' });
66+
if(reader && reader.result){
67+
const uint8Array = new Uint8Array(reader.result as ArrayBuffer);
68+
dbx.filesUpload({ path: '/' + pdfviewer.fileName, contents: uint8Array })
69+
.then(response => {
70+
console.log(response);
71+
})
72+
.catch(error => {
73+
console.error(error);
74+
});
75+
}
76+
}
77+
};
78+
reader.readAsArrayBuffer(value);
79+
});
80+
}
81+
```
82+
83+
N> The **npm install dropbox** package must be installed in your application to use the previous code example.
84+
85+
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage/tree/master/Open%20and%20Save%20PDF%20in%20Drop%20Box%20using%20Standalone)
86+
87+
## Using Server-Backed PDF Viewer
88+
1489
To save a PDF file to Dropbox cloud file storage, you can follow the steps below
1590

1691
**Step 1** Create a Dropbox API
@@ -129,4 +204,4 @@ viewer.load('PDF_Succinctly.pdf', null);
129204

130205
N> The **Dropbox.Api** NuGet package must be installed in your application to use the previous code example.
131206

132-
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage)
207+
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage/tree/master/Open%20and%20Save%20PDF%20in%20Drop%20Box%20using%20Server-Backed)

ej2-javascript/pdfviewer/ts/open-pdf-file/from-dropbox-cloud-file-storage.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,61 @@ domainurl: ##DomainURL##
1111

1212
# Open PDF file from Dropbox cloud file storage
1313

14+
PDF Viewer allows to load PDF file from Drop Box using either the Standalone or Server-backed PDF Viewer. Below are the steps and a sample to demonstrate how to open a PDF from Drop Box.
15+
16+
## Using Standalone PDF Viewer
17+
18+
To load a PDF file from Dropbox cloud file storage in a PDF Viewer, you can follow the steps below
19+
20+
**Step 1** Create a Dropbox API
21+
22+
To create a Dropbox API App, you should follow the official documentation provided by Dropbox [link](https://www.dropbox.com/developers/documentation/dotnet#tutorial). The process involves visiting the Dropbox Developer website and using their App Console to set up your API app. This app will allow you to interact with Dropbox programmatically, enabling secure access to files and data.
23+
24+
**Step 2:** Create a Simple PDF Viewer Sample in Typescript
25+
26+
Start by following the steps provided in this [link](https://ej2.syncfusion.com/documentation/pdfviewer/getting-started) to create a simple PDF viewer sample in Typescript. This will give you a basic setup of the PDF viewer component.
27+
28+
**Step 3:** Modify the `src/app/app.ts` File in the Angular Project
29+
30+
1. Import the required namespaces at the top of the file:
31+
32+
```typescript
33+
import { Dropbox } from 'dropbox';
34+
```
35+
36+
2. Create an instance of the Dropbox class using an access token for authentication. Next, call the filesDownload method of this Dropbox instance to download the file located at /PDF_Succinctly.pdf. Upon successfully downloading the file, extract the file blob from the response. Convert this file blob to a Base64 string using the blobToBase64 method. Finally, load the Base64 string into a PDF viewer control.
37+
38+
N> Replace **Your Access Token** with the actual Access Token of your Drop Box account.
39+
40+
```typescript
41+
pdfviewer.created = function () {
42+
let dbx = new Dropbox({ accessToken: 'Your Access Token' });
43+
dbx.filesDownload({ path: '/PDF_Succinctly.pdf' }).then(async (response) => {
44+
const blob = await (response.result as any).fileBlob;
45+
const base64String = await blobToBase64(blob);
46+
setTimeout(() => {
47+
pdfviewer.load(base64String, "");
48+
}, 2000);
49+
});
50+
}
51+
52+
function blobToBase64(blob: Blob): Promise<string> {
53+
return new Promise((resolve, reject) => {
54+
const reader = new FileReader();
55+
reader.readAsDataURL(blob);
56+
reader.onloadend = () => {
57+
resolve(reader.result as string);
58+
};
59+
});
60+
}
61+
```
62+
63+
N> The **npm install dropbox** package must be installed in your application to use the previous code example.
64+
65+
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage/tree/master/Open%20and%20Save%20PDF%20in%20Drop%20Box%20using%20Standalone)
66+
67+
## Using Server-Backed PDF Viewer
68+
1469
To load a PDF file from Dropbox cloud file storage in a PDF Viewer, you can follow the steps below
1570

1671
**Step 1** Create a Dropbox API
@@ -135,4 +190,4 @@ viewer.load('PDF_Succinctly.pdf', null);
135190

136191
N> The **Dropbox.Api** NuGet package must be installed in your application to use the previous code example.
137192

138-
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage)
193+
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-dropbox-cloud-file-storage/tree/master/Open%20and%20Save%20PDF%20in%20Drop%20Box%20using%20Server-Backed)

0 commit comments

Comments
 (0)