Skip to content

Commit b5afd32

Browse files
committed
906190: UGDocumentation
1 parent 0b3aecd commit b5afd32

File tree

4 files changed

+46
-16
lines changed

4 files changed

+46
-16
lines changed

How to/Customization of Print Quality/src/app/app.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ PdfViewer.Inject(Toolbar, Magnification, Navigation, Annotation, LinkAnnotation,
55
let pdfviewer: PdfViewer = new PdfViewer();
66
pdfviewer.documentPath = "https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf";
77
pdfviewer.resourceUrl = "https://cdn.syncfusion.com/ej2/27.1.48/dist/ej2-pdfviewer-lib";
8-
//By changing value of the printScaleFactor we can adjust the quality of the PDF file.
98
pdfviewer.printScaleFactor=0.5;
109
pdfviewer.appendTo('#PdfViewer');
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const HtmlWebpackPlugin = require("html-webpack-plugin");
2+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3+
const path = require('path');
4+
5+
module.exports = {
6+
entry: ['./src/app/app.ts', './src/styles/styles.css'],
7+
module: {
8+
rules: [
9+
{
10+
test: /\.ts?$/,
11+
use: 'ts-loader',
12+
exclude: /node_modules/,
13+
},
14+
{
15+
test: /\.css$/,
16+
use: [ MiniCssExtractPlugin.loader, "css-loader" ]
17+
},
18+
],
19+
},
20+
resolve: {
21+
extensions: ['.ts', '.js'],
22+
},
23+
output: {
24+
filename: 'bundle.js',
25+
path: path.resolve(__dirname, 'dist'),
26+
},
27+
plugins: [
28+
new HtmlWebpackPlugin({
29+
template: 'src/index.html'
30+
}),
31+
new MiniCssExtractPlugin({
32+
filename: "bundle.css"
33+
})
34+
],
35+
devServer: {
36+
static: path.join(__dirname, "dist"),
37+
compress: true,
38+
port: 4000,
39+
open: true
40+
},
41+
};
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
import { PdfViewer, Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, FormFields, FormDesigner} from '@syncfusion/ej2-pdfviewer';
1+
import { PdfViewer, Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, FormFields, FormDesigner, Print} from '@syncfusion/ej2-pdfviewer';
22

3-
PdfViewer.Inject(Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, FormFields, FormDesigner);
3+
PdfViewer.Inject(Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, FormFields, FormDesigner, Print);
44

55
let pdfviewer: PdfViewer = new PdfViewer();
66
pdfviewer.documentPath = "https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf";
7-
pdfviewer.resourceUrl = "https://cdn.syncfusion.com/ej2/23.1.43/dist/ej2-pdfviewer-lib";
8-
7+
pdfviewer.resourceUrl = "https://cdn.syncfusion.com/ej2/27.1.48/dist/ej2-pdfviewer-lib";
8+
pdfviewer.printScaleFactor=0.5;
99
pdfviewer.appendTo('#PdfViewer');
10-
document.getElementById('openBookmark').addEventListener('click', () => {
11-
// Open Bookmark pane
12-
pdfviewer.bookmarkViewModule.openBookmarkPane();
13-
});
14-
15-
document.getElementById('closeBookmark').addEventListener('click', () => {
16-
// close Bookmark pane
17-
pdfviewer.bookmarkViewModule.closeBookmarkPane();
18-
});

How to/Open and Close bookmark pane/src/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
</head>
1313

1414
<body>
15-
<button id="openBookmark">Open Bookmark Pane</button>
16-
<button id="closeBookmark">Close Bookmark Pane</button>
15+
<div style="margin-top: 70px;"></div>
1716
<!--Element which will render as PDF Viewer -->
1817
<div id="PdfViewer"></div>
1918
</body>

0 commit comments

Comments
 (0)