-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
52 lines (48 loc) · 1.8 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
Copyright 2019 Adobe
All Rights Reserved.
NOTICE: Adobe permits you to use, modify, and distribute this file in
accordance with the terms of the Adobe license agreement accompanying
it. If you have received this file from a source other than Adobe,
then your use, modification, or distribution of it requires the prior
written permission of Adobe.
*/
/* Control the default view mode */
const viewerConfig = {
/* Allowed possible values are "FIT_PAGE", "FIT_WIDTH", "TWO_COLUMN", "TWO_COLUMN_FIT_PAGE" or "". */
defaultViewMode: "",
};
/* Wait for Adobe Acrobat Services PDF Embed API to be ready */
document.addEventListener("adobe_dc_view_sdk.ready", function () {
/* Initialize the AdobeDC View object */
var adobeDCView = new AdobeDC.View({
/* Pass your registered client id */
clientId: "9c8d7fc18acd4b95a4b556edcd2949e8",
/* Pass the div id in which PDF should be rendered */
divId: "adobe-dc-view",
});
/* Invoke the file preview API on Adobe DC View object */
adobeDCView.previewFile({
/* Pass information on how to access the file */
content: {
/* Location of file where it is hosted */
location: {
url: 'https://raw.githubusercontent.com/panoptic-labs/pips/main/Panoptic_PIPs_v1.0.0.pdf',
/*
If the file URL requires some additional headers, then it can be passed as follows:-
headers: [
{
key: "<HEADER_KEY>",
value: "<HEADER_VALUE>",
}
]
*/
},
},
/* Pass meta data of file */
metaData: {
/* file name */
fileName: "Panoptic PIPs v1.0.0.pdf"
}
}, viewerConfig);
});