-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathapp.js
More file actions
17 lines (17 loc) · 710 Bytes
/
app.js
File metadata and controls
17 lines (17 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
export async function getUserAgent() {
console.log(navigator.userAgent);
return navigator.userAgent;
}
export async function showPdf(baseurl, element, stream) {
const arrayBuffer = await stream.arrayBuffer();
const blob = new Blob([arrayBuffer], { type: 'application/pdf' });
const urlblob = URL.createObjectURL(blob);
element.src = baseurl.replace('(1)', urlblob);
}
export function setWatermark(watermark, element) {
console.log(element.contentWindow.document)
var elmnt = element.contentWindow.document.getElementById("watermark");
//elmnt.style.display = "none";
//var d = y.getElementById("watermark");
//y.getElementById("watermark").value = watermark;
}