Skip to content

Commit 5a65bda

Browse files
Merge pull request #45 from SyncfusionExamples/EJ2-extractTextOption
Ej2 extract text option
2 parents 24398c4 + f41d7b0 commit 5a65bda

33 files changed

+651
-0
lines changed

How to/Extract Text Option/.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?

How to/Extract Text Option/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# textsearch
2+
3+
## Project setup
4+
```
5+
npm install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
npm run serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
npm run build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
npm run lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"module": "esnext",
5+
"baseUrl": "./",
6+
"moduleResolution": "node",
7+
"paths": {
8+
"@/*": [
9+
"src/*"
10+
]
11+
},
12+
"lib": [
13+
"esnext",
14+
"dom",
15+
"dom.iterable",
16+
"scripthost"
17+
]
18+
}
19+
}
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "textsearch",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"@syncfusion/ej2-vue-pdfviewer": "*",
12+
"core-js": "^3.8.3",
13+
"vue": "^3.2.13",
14+
"buffer": "^6.0.3",
15+
"crypto-browserify": "^3.12.0",
16+
"stream-browserify": "^3.0.0",
17+
"util": "^0.12.5",
18+
"vm-browserify": "^1.1.2"
19+
},
20+
"devDependencies": {
21+
"@babel/core": "^7.12.16",
22+
"@babel/eslint-parser": "^7.12.16",
23+
"@vue/cli-plugin-babel": "~5.0.0",
24+
"@vue/cli-plugin-eslint": "~5.0.0",
25+
"@vue/cli-service": "~5.0.0",
26+
"eslint": "^7.32.0",
27+
"eslint-plugin-vue": "^8.0.3"
28+
},
29+
"eslintConfig": {
30+
"root": true,
31+
"env": {
32+
"node": true
33+
},
34+
"extends": [
35+
"plugin:vue/essential",
36+
"eslint:recommended"
37+
],
38+
"parserOptions": {
39+
"parser": "@babel/eslint-parser"
40+
},
41+
"rules": {}
42+
},
43+
"browserslist": [
44+
"> 1%",
45+
"last 2 versions",
46+
"not dead",
47+
"not ie 11"
48+
]
49+
}
4.19 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<br><br><br>
15+
<div id="app"></div>
16+
<!-- built files will be auto injected -->
17+
</body>
18+
</html>
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<template>
2+
<div id="app">
3+
<ejs-pdfviewer
4+
id="pdfViewer"
5+
ref="pdfviewer"
6+
:documentPath="documentPath"
7+
:extractTextOption="extractTextOption"
8+
:resourceUrl="resourceUrl"
9+
style="height: 640px;"
10+
>
11+
</ejs-pdfviewer>
12+
</div>
13+
</template>
14+
15+
<script>
16+
import {
17+
PdfViewerComponent,
18+
Toolbar,
19+
Magnification,
20+
Navigation,
21+
Annotation,
22+
TextSelection,
23+
TextSearch,
24+
FormFields,
25+
FormDesigner,
26+
PageOrganizer,
27+
} from '@syncfusion/ej2-vue-pdfviewer';
28+
29+
export default {
30+
name: 'App',
31+
components: {
32+
'ejs-pdfviewer': PdfViewerComponent,
33+
},
34+
data() {
35+
return {
36+
documentPath:'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf',
37+
resourceUrl: 'https://cdn.syncfusion.com/ej2/29.1.33/dist/ej2-pdfviewer-lib',
38+
extractTextOption: 'None', // Options: 'None', 'TextOnly', 'BoundsOnly', 'TextAndBounds'
39+
};
40+
},
41+
provide: {
42+
PdfViewer: [
43+
Toolbar,
44+
Magnification,
45+
Navigation,
46+
Annotation,
47+
TextSelection,
48+
TextSearch,
49+
FormFields,
50+
FormDesigner,
51+
PageOrganizer,
52+
],
53+
},
54+
};
55+
</script>
56+
<style>
57+
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
58+
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css";
59+
@import "../node_modules/@syncfusion/ej2-dropdowns/styles/material.css";
60+
@import "../node_modules/@syncfusion/ej2-inputs/styles/material.css";
61+
@import "../node_modules/@syncfusion/ej2-navigations/styles/material.css";
62+
@import "../node_modules/@syncfusion/ej2-popups/styles/material.css";
63+
@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css";
64+
@import "../node_modules/@syncfusion/ej2-vue-pdfviewer/styles/material.css";
65+
</style>
6.69 KB
Loading
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { createApp } from 'vue'
2+
import App from './App.vue'
3+
4+
createApp(App).mount('#app')
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const { defineConfig } = require('@vue/cli-service')
2+
module.exports = defineConfig({
3+
transpileDependencies: true
4+
})

How to/Extract Text/.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?

How to/Extract Text/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# textsearch
2+
3+
## Project setup
4+
```
5+
npm install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
npm run serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
npm run build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
npm run lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).

How to/Extract Text/babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}

How to/Extract Text/jsconfig.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"module": "esnext",
5+
"baseUrl": "./",
6+
"moduleResolution": "node",
7+
"paths": {
8+
"@/*": [
9+
"src/*"
10+
]
11+
},
12+
"lib": [
13+
"esnext",
14+
"dom",
15+
"dom.iterable",
16+
"scripthost"
17+
]
18+
}
19+
}

How to/Extract Text/package.json

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "textsearch",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"@syncfusion/ej2-vue-pdfviewer": "*",
12+
"core-js": "^3.8.3",
13+
"vue": "^3.2.13",
14+
"buffer": "^6.0.3",
15+
"crypto-browserify": "^3.12.0",
16+
"stream-browserify": "^3.0.0",
17+
"util": "^0.12.5",
18+
"vm-browserify": "^1.1.2"
19+
},
20+
"devDependencies": {
21+
"@babel/core": "^7.12.16",
22+
"@babel/eslint-parser": "^7.12.16",
23+
"@vue/cli-plugin-babel": "~5.0.0",
24+
"@vue/cli-plugin-eslint": "~5.0.0",
25+
"@vue/cli-service": "~5.0.0",
26+
"eslint": "^7.32.0",
27+
"eslint-plugin-vue": "^8.0.3"
28+
},
29+
"eslintConfig": {
30+
"root": true,
31+
"env": {
32+
"node": true
33+
},
34+
"extends": [
35+
"plugin:vue/essential",
36+
"eslint:recommended"
37+
],
38+
"parserOptions": {
39+
"parser": "@babel/eslint-parser"
40+
},
41+
"rules": {}
42+
},
43+
"browserslist": [
44+
"> 1%",
45+
"last 2 versions",
46+
"not dead",
47+
"not ie 11"
48+
]
49+
}
4.19 KB
Binary file not shown.

How to/Extract Text/public/index.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<br><br><br>
15+
<div id="app"></div>
16+
<!-- built files will be auto injected -->
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)