Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 39b0fbe

Browse files
Corrected compile errors
1. Updated title on the index.html 2. Updated PDFTron references in LICENSE 3. Updated package versions in package-lock.json 4. Update package versions, and `start` script on package,json 5. Updated README contents: links, added Apryse references in place of PDFTron, and restructured some sections. 6. removed 'build' script on package.json as it is not needed on this project. All you need is 'start' script and all steps are completed to run server with the needed resources.
1 parent 9cef234 commit 39b0fbe

File tree

6 files changed

+2446
-3592
lines changed

6 files changed

+2446
-3592
lines changed

LICENSE

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
Copyright 2020 PDFTron Systems Inc. All rights reserved.
2-
WebViewer React UI project/codebase or any derived works is only permitted in solutions with an active commercial PDFTron WebViewer license. For exact licensing terms please refer to your commercial WebViewer license. For use in other scenario, please contact [email protected]
2+
WebViewer React UI project/codebase or any derived works is only permitted in solutions with an active commercial PDFTron WebViewer license.
3+
4+
For exact licensing terms, refer to your commercial WebViewer license. For any licensing, pricing, or product questions, contact [Sales](https://apryse.com/form/contact-sales).
5+

README.md

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WebViewer - JS Sample
22

3-
[WebViewer](https://www.pdftron.com/documentation/web/) is a powerful JavaScript-based PDF Library that's part of the [PDFTron SDK](https://www.pdftron.com). It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulate PDFs, MS Office, videos, images, and CAD that can be embedded into any web project.
3+
[WebViewer](https://docs.apryse.com/documentation/web/) is a powerful JavaScript-based PDF Library that is part of the [Apryse SDK](https://apryse.com/). It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulate PDFs, MS Office, videos, images, and CAD that can be embedded into any web project.
44

55
![WebViewer UI](https://www.pdftron.com/downloads/pl/webviewer-ui.png)
66

@@ -10,9 +10,14 @@ This repo is specifically designed for any users interested in integrating WebVi
1010

1111
You can explore all of the functionality in our [showcase](https://www.pdftron.com/webviewer/demo/).
1212

13-
## Initial setup
13+
## Initial Setup
1414

15-
Before you begin, make sure your development environment includes [Node.js](https://nodejs.org/en/).
15+
Before you begin, make sure your development environment includes [Node.js and npm](https://www.npmjs.com/get-npm).
16+
17+
18+
1. [Node.js](https://nodejs.org/en).
19+
2. IDE used in this sample is Visual Studio Code with an NPM extension to process commands within its terminal.
20+
3. [GitHub command line](https://github.com/git-guides/install-git) `git`.
1621

1722
## Install
1823

@@ -22,17 +27,29 @@ cd webviewer-js-sample
2227
npm install
2328
```
2429

30+
`npm install` gets and installs required dependencies. Make sure `.parcelrc` is available at the root and configured as below.
31+
32+
```
33+
{
34+
"extends": "@parcel/config-default",
35+
"reporters": [
36+
"...",
37+
"parcel-reporter-multiple-static-file-copier"
38+
]
39+
}
40+
```
41+
2542
## Run
2643

2744
```
2845
npm start
2946
```
3047

31-
After the app starts, you will be able to see WebViewer running on `localhost:1234`.
48+
After the app starts, you will be able to see a WebViewer running on `localhost:1234`.
3249

3350
## Static Resources
3451

35-
WebViewer requires static resources. [parcel-reporter-multiple-static-file-copier](https://www.npmjs.com/package/parcel-reporter-multiple-static-file-copier) does the job for us by copying the resources into statically served directory:
52+
`WebViewer` requires static resources created in the `dist` folder. Make sure the `origin` and `destination` are specified as below in the `package.json`,
3653

3754
```
3855
"multipleStaticFileCopier": [
@@ -43,25 +60,25 @@ WebViewer requires static resources. [parcel-reporter-multiple-static-file-copie
4360
]
4461
```
4562

46-
You can manually copy it, use a `postinstall` script or leverage parcel.
47-
48-
Remember to install `@parcel/config-default` and configure `.parcelrc`:
63+
The `package.json` files contains the `start` and `build` scripts. The only script to call is the `start` to run the app out-of-the-box. The `build` is just to allow copying of resources to
4964

5065
```
51-
{
52-
"extends": "@parcel/config-default",
53-
"reporters": [
54-
"...",
55-
"parcel-reporter-multiple-static-file-copier"
56-
]
57-
}
66+
"start": "parcel index.html --open http://localhost:1234",
67+
"build": "parcel build",
5868
```
5969

6070
## WebViewer APIs
6171

62-
See [API documentation](https://www.pdftron.com/documentation/web/guides/ui/apis).
72+
* [@pdftron/webviewer API documentation](https://docs.apryse.com/api/web/global.html#WebViewer__anchor)
73+
* [@pdftron/webviewer-js-sample API documentation](https://github.com/ApryseSDK/webviewer-js-sample)
74+
* [API documentation: WebViewerInstance](https://docs.apryse.com/api/web/WebViewerInstance.html).
75+
76+
## Showcase
77+
78+
Refer to a running sample on Apryse SDK [showcase page](https://showcase.apryse.com/).
79+
6380

6481
## License
6582

66-
See [license](./LICENSE).
67-
![](https://onepixel.pdftron.com/webviewer-react-sample)
83+
For licensing, refer to [License](LICENSE).
84+

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>PDFTron's WebViewer</title>
4+
<title>Apryse WebViewer - JS Sample</title>
55
</head>
66

77
<script type="module" src='index.js'></script>

0 commit comments

Comments
 (0)