Skip to content

Commit be1d328

Browse files
committed
Initial commit
0 parents  commit be1d328

File tree

111 files changed

+6081
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+6081
-0
lines changed

.gitignore

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Serverless directories
108+
.serverless/
109+
110+
# FuseBox cache
111+
.fusebox/
112+
113+
# DynamoDB Local files
114+
.dynamodb/
115+
116+
# TernJS port file
117+
.tern-port
118+
119+
# Stores VSCode versions used for testing VSCode extensions
120+
.vscode-test
121+
122+
# yarn v2
123+
.yarn/cache
124+
.yarn/unplugged
125+
.yarn/build-state.yml
126+
.yarn/install-state.gz
127+
.pnp.*

Aspose.jpg

13.5 KB
Loading

AsposePDFforJS.js

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AsposePDFforJS.wasm.zip

45.5 MB
Binary file not shown.

LICENSE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EULA
2+
3+
The End User License Agreement ("EULA") contains the terms and conditions that
4+
govern Your use of Aspose's products enclosed or otherwise accompanied herewith
5+
(individually and collectively, the "PRODUCT") (as linked to below) and imposes
6+
material limitations on Your License. You should read the EULA carefully. BY
7+
INSTALLING, DOWNLOADING, COPYING OR OTHERWISE USING THE PRODUCT, YOU AGREE TO BE
8+
BOUND BY THE TERMS OF THE ASPOSE EULA.
9+
10+
You may obtain a copy of the Aspose EULA at: https://about.aspose.com/legal/eula
11+
12+
## 3rd party Licenses
13+
14+
Please follow to ./license/3rdparty.pdf to get full info about 3rd party Licenses.

README.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Browser API to Process & Manipulate PDF Files
2+
3+
Add PDF processing, manipulation, and conversion features to your front-end applications.
4+
5+
[Aspose.PDF for JavaScript via C++](https://products.aspose.com/pdf/javascript) allows you to work with PDF documents, pages, text, images, attachments, fonts, security, and signatures.
6+
7+
<p align="center">
8+
<a title="Download complete Aspose.PDF for JavaScript via C++ code" href="https://releases.aspose.com/pdf/javascriptcpp/new-releases/">
9+
<img src="https://raw.github.com/AsposeExamples/java-examples-dashboard/master/images/downloadZip-Button-Large.png" />
10+
</a>
11+
</p>
12+
13+
## PDF Processing via JavaScript
14+
15+
- **Extract text** from PDF pages or search for a particular text segment using regular expressions.
16+
- **Add or extract** images to & from PDF documents.
17+
- **Concatenate** or **split** PDF files.
18+
- **Linearization** of PDF documents for web optimization.
19+
- **Convert** PDF documents to Office, web, and image formats with the highest visual fidelity.
20+
- Manipulate PDF files to manage bookmarks, hyperlinks, watermarks, attachments & annotations.
21+
- **Encrypt** or **decrypt** PDF documents and set document privileges or modify passwords.
22+
- **Digitally sign PDF** documents or remove signatures. Also, verify if the PDF is signed and the signature is valid.
23+
24+
## Read & Write PDF & Other Formats
25+
26+
**Fixed Layout:** PDF, PDF/A, PDF/UA
27+
28+
## Save PDF Documents As
29+
30+
**Microsoft Office:** DOC, DOCX, XLS, XLSX, PPTX
31+
**Images:** JPEG, PNG, BMP, TIFF, EMF
32+
**Others:** EPUB, DICOM, SVG, SVG(ZIP), GRAYSCALE PDF, PDF/A, TEX, TXT
33+
34+
## Platform Independence
35+
36+
Aspose.PDF for JavaScript via C++ is a WebAssembly-based library that can be used to create applications in any browser that supports this technology.
37+
The library was written in C++ and does not require additional runtime environments.
38+
39+
## Getting Started with Aspose.PDF for JavaScript via C++
40+
41+
Are you ready to give Aspose.PDF for JavaScript via C++ a try?
42+
43+
- Execute `npm install git+https://github.com/asposepdf/aspose-pdf-js.git` in Terminal in Visual Studio Code or in another console.
44+
- You can also add one line in `dependency` section of `package.json` manually
45+
46+
```json
47+
"dependencies": {
48+
"some-package": "link",
49+
"aspose-pdf-js": "github:asposepdf/aspose-pdf-js",
50+
"another-package": "link"
51+
}
52+
```
53+
54+
## Setting up
55+
56+
- Rename `setting.json.default` into `settings.json`
57+
- Add desired values into `settings.json`
58+
- Put `arial.ttf` and `times.ttf` into `fonts` folder
59+
60+
You need to use `encrypt_lic.html` to get an encrypted license file for running in full-featured mode.
61+
62+
## Extract Text From Whole PDF
63+
64+
```js
65+
// Add this function as handler for file-upload element
66+
var ffileExtract = function (e) {
67+
const file_reader = new FileReader();
68+
file_reader.onload = (event) => {
69+
/*Extract text from a PDF-file*/
70+
const json = AsposePdfExtractText(event.target.result, e.target.files[0].name);
71+
if (json.errorCode == 0) document.getElementById('output').textContent = json.extractText;
72+
else document.getElementById('output').textContent = json.errorText;
73+
};
74+
file_reader.readAsArrayBuffer(e.target.files[0]);
75+
};
76+
```
77+
78+
## Save PDF as Office Formats
79+
80+
One of the most popular features of Aspose.PDF for JavaScript via C++ is to convert PDF documents to other formats without needing to understand the underlying structure of the resultant format.
81+
82+
Give the following snippet a try with your samples:
83+
84+
```js
85+
// Add this function as handler for file-upload element
86+
var ffileToDocX = function (e) {
87+
const file_reader = new FileReader();
88+
file_reader.onload = (event) => {
89+
/*convert a PDF-file to DocX and save the "ResultPDFtoDocX.docx"*/
90+
const json = AsposePdfToDocX(event.target.result, e.target.files[0].name, "ResultPDFtoDocX.docx");
91+
if (json.errorCode == 0) document.getElementById('output').textContent = json.fileNameResult;
92+
else document.getElementById('output').textContent = json.errorText;
93+
/*make a link to download the result file*/
94+
DownloadFile(json.fileNameResult,
95+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document");
96+
}
97+
file_reader.readAsArrayBuffer(e.target.files[0]);
98+
}
99+
```
100+
101+
[Home](https://www.aspose.com/) | [Product Page](https://products.aspose.com/pdf/javascript-cpp) | [Docs](https://docs.aspose.com/pdf/javascript-cpp/) | [Demos](https://products.aspose.app/pdf/family) | [API Reference](https://apireference.aspose.com/pdf/javascript-cpp) | [Examples](https://github.com/aspose-pdf/aspose-pdf-js) | [Blog](https://blog.aspose.com/category/pdf/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/pdf) | [Temporary License](https://purchase.aspose.com/temporary-license)

encrypt_lic.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
5+
<meta charset="UTF-8">
6+
<title>Encrypt .lic-file Aspose.PDF for JavaScript via C++</title>
7+
<style>
8+
a:link,a:visited{background-color:#5eef3d;color:#fff;padding:15px 25px;text-align:center;text-decoration:none;display:inline-block;margin-left:16px;border-radius:4px;border:thin solid grey}a:active,a:hover{background-color:#65ff43}
9+
input::file-selector-button{font-weight:700;background-color:#5eef3d;color:#fff;padding:15px;text-align:center;text-decoration:none;display:inline-block;width:150px;border-radius:4px;border:thin solid grey}
10+
</style>
11+
</head>
12+
13+
<body style="background-color:#2871e6;font-family:Arial;margin:auto">
14+
<div id="ASPOSE" style="overflow:auto">
15+
<div style="float:left;margin-left:8px;margin-top:8px">
16+
<img src="favicon.ico" alt="ASPOSE" width="32px" height="32px"/>
17+
</div>
18+
<div style="float:left;margin-left:8px;margin-top:8px">
19+
<label style="color:white;font:bold 32px Arial">Aspose.PDF for JavaScript via C++</label>
20+
</div>
21+
<div style="border-top: 48px solid #000"></div>
22+
</div>
23+
24+
<div style="margin-left:16px;margin-right:16px;margin-top:16px;margin-bottom:16px">
25+
<br>
26+
<label style="color:white;font:bold 16px Arial" for="fileEncrypt">Choose .lic-file to encrypt</label>
27+
<input type="file" id="fileEncrypt" accept=".lic" onchange="ffileEncrypt(event)">
28+
<br>
29+
<pre id="output"></pre>
30+
<br>
31+
</div>
32+
</body>
33+
34+
<script type="text/javascript" async src="AsposePDFforJS.js"></script>
35+
<script type="text/javascript">
36+
37+
var ffileEncrypt = function(e) {
38+
const file_reader = new FileReader();
39+
file_reader.onload = (event) => {
40+
const json = AsposePdfEncryptLic(event.target.result, e.target.files[0].name, "aspose.enc");
41+
if (json.errorCode == 0) document.getElementById('output').textContent = "Encrypt OK: " + json.fileNameResult;
42+
else document.getElementById('output').textContent = "Encrypt ERROR: " + json.errorText;
43+
DownloadFile(json.fileNameResult, "application/octet-stream");
44+
};
45+
file_reader.readAsArrayBuffer(e.target.files[0]);
46+
};
47+
48+
</script>
49+
50+
</html>

0 commit comments

Comments
 (0)