Skip to content

Commit b5123f8

Browse files
SaravanaPriya31SaravanaPriya31
authored andcommitted
883856: commit
1 parent 0b5561d commit b5123f8

File tree

14 files changed

+270
-9
lines changed

14 files changed

+270
-9
lines changed

How to/Organize pdf/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
},
1010
"dependencies": {
1111
"@syncfusion/ej2-vue-pdfviewer": "*",
12+
"@syncfusion/ej2-base": "*",
1213
"core-js": "^3.8.3",
1314
"vue": "^2.6.14"
1415
},

How to/Organize pdf/src/App.vue

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import Vue from 'vue';
1515
import { PdfViewerPlugin, Toolbar, Magnification, Navigation,
1616
LinkAnnotation, BookmarkView, Annotation, ThumbnailView,
1717
Print, TextSelection, TextSearch, FormFields, FormDesigner,PageOrganizer } from '@syncfusion/ej2-vue-pdfviewer';
18+
import {Browser} from '@syncfusion/ej2-base';
1819
Vue.use(PdfViewerPlugin);
19-
var isInitialLoading = true;
2020
2121
export default {
2222
name: 'app',
@@ -33,14 +33,13 @@ export default {
3333
methods: {
3434
documentLoad: function () {
3535
var viewer = this.$refs.pdfviewer.ej2Instances;
36-
if(isInitialLoading)
37-
{
38-
viewer.isPageOrganizerOpen = true;
39-
isInitialLoading = false;
40-
}
41-
else{
42-
viewer.isPageOrganizerOpen = false;
43-
}
36+
if (Browser.isDevice && !viewer.enableDesktopMode) {
37+
viewer.maxZoom = 200;
38+
viewer.minZoom = 10;
39+
}
40+
else{
41+
viewer.zoomMode = 'Default';
42+
}
4443
},
4544
}
4645
}
Lines changed: 23 additions & 0 deletions
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?
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# quickstart
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/).
Lines changed: 5 additions & 0 deletions
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+
}
Lines changed: 19 additions & 0 deletions
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+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "quickstart",
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": "^2.6.14"
14+
},
15+
"devDependencies": {
16+
"@babel/core": "^7.12.16",
17+
"@babel/eslint-parser": "^7.12.16",
18+
"@vue/cli-plugin-babel": "~5.0.0",
19+
"@vue/cli-plugin-eslint": "~5.0.0",
20+
"@vue/cli-service": "~5.0.0",
21+
"eslint": "^7.32.0",
22+
"eslint-plugin-vue": "^8.0.3",
23+
"vue-template-compiler": "^2.6.14"
24+
},
25+
"eslintConfig": {
26+
"root": true,
27+
"env": {
28+
"node": true
29+
},
30+
"extends": [
31+
"plugin:vue/essential",
32+
"eslint:recommended"
33+
],
34+
"parserOptions": {
35+
"parser": "@babel/eslint-parser"
36+
},
37+
"rules": {}
38+
},
39+
"browserslist": [
40+
"> 1%",
41+
"last 2 versions",
42+
"not dead"
43+
]
44+
}
Binary file not shown.
Lines changed: 18 additions & 0 deletions
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>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<template>
2+
<div id="app">
3+
<ejs-pdfviewer
4+
id="pdfViewer"
5+
ref="pdfviewer"
6+
:documentPath="documentPath"
7+
:documentLoad="documentLoad"
8+
:resourceUrl="resourceUrl">
9+
</ejs-pdfviewer>
10+
</div>
11+
</template>
12+
13+
<script>
14+
import Vue from 'vue';
15+
import { PdfViewerPlugin, Toolbar, Magnification, Navigation,
16+
LinkAnnotation, BookmarkView, Annotation, ThumbnailView,
17+
Print, TextSelection, TextSearch, FormFields, FormDesigner,PageOrganizer } from '@syncfusion/ej2-vue-pdfviewer';
18+
Vue.use(PdfViewerPlugin);
19+
var isInitialLoading = true;
20+
21+
export default {
22+
name: 'app',
23+
data () {
24+
return {
25+
resourceUrl:"https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib",
26+
documentPath:"https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
27+
};
28+
},
29+
provide: {
30+
PdfViewer: [ Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, Annotation,
31+
ThumbnailView, Print, TextSelection, TextSearch, FormFields, FormDesigner, PageOrganizer ]},
32+
33+
methods: {
34+
documentLoad: function () {
35+
var viewer = this.$refs.pdfviewer.ej2Instances;
36+
if(isInitialLoading)
37+
{
38+
viewer.isPageOrganizerOpen = true;
39+
isInitialLoading = false;
40+
}
41+
else{
42+
viewer.isPageOrganizerOpen = false;
43+
}
44+
},
45+
}
46+
}
47+
</script>
48+
49+
<style>
50+
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
51+
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css";
52+
@import "../node_modules/@syncfusion/ej2-dropdowns/styles/material.css";
53+
@import "../node_modules/@syncfusion/ej2-inputs/styles/material.css";
54+
@import "../node_modules/@syncfusion/ej2-navigations/styles/material.css";
55+
@import "../node_modules/@syncfusion/ej2-popups/styles/material.css";
56+
@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css";
57+
@import "../node_modules/@syncfusion/ej2-vue-pdfviewer/styles/material.css";
58+
</style>

0 commit comments

Comments
 (0)