pvb
March 20, 2020, 10:14pm
1
Hello,
i want display a uploaded pdf.
On Safari works fine but not on windows devices. I tried it with Chrome/Mozilla/Edge and got on all a different result. I tried different pc´s but i got the same problems
Any ideas?
HTML-Form: <form role="form" name="form"> <div class="col-md-8"> <p> test <p> <! - Pastebin.com
BPMN-Prozess: pdfUploadJsoup.bpmn (3.7 KB)
Chrome
IE
FireFox
Safari
Hi there @pvb . My solution is to convert to a blob then use embed:
HTML
[HTML]
embed class=“col-sm-12” style=“height:100vh;width:100%” type=“application/pdf” id=“pdf-frame”
[HTM:]
JS
fetch("http://localhost:8181/camunda/api/engine/engine/default/task/" + camForm.taskId + "/variables/ACORD_FORM/data").then(function (response) {
return response.blob();
}).then(function (myBlob) {
var objectURL = URL.createObjectURL(myBlob);
document.querySelector('#pdf-frame').src = '';
document.querySelector('#pdf-frame').src = objectURL;
objectURL = URL.revokeObjectURL(myBlob);
});