Spaces:
Sleeping
Sleeping
Update templates/gui.html
Browse files- templates/gui.html +4 -2
templates/gui.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
<title>View PDF with PDF.js</title>
|
| 7 |
|
| 8 |
<!-- Include PDF.js -->
|
| 9 |
-
<script src="https://
|
| 10 |
|
| 11 |
<style>
|
| 12 |
canvas {
|
|
@@ -19,13 +19,15 @@
|
|
| 19 |
|
| 20 |
<h2>PDF Viewer</h2>
|
| 21 |
|
| 22 |
-
<!-- Container
|
| 23 |
<div id="pdf-container"></div>
|
| 24 |
|
| 25 |
<script>
|
| 26 |
async function renderPdf() {
|
| 27 |
try {
|
| 28 |
const url = '/download-pdf';
|
|
|
|
|
|
|
| 29 |
const loadingTask = pdfjsLib.getDocument(url);
|
| 30 |
|
| 31 |
const pdf = await loadingTask.promise;
|
|
|
|
| 6 |
<title>View PDF with PDF.js</title>
|
| 7 |
|
| 8 |
<!-- Include PDF.js -->
|
| 9 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.938/pdf.min.js"></script>
|
| 10 |
|
| 11 |
<style>
|
| 12 |
canvas {
|
|
|
|
| 19 |
|
| 20 |
<h2>PDF Viewer</h2>
|
| 21 |
|
| 22 |
+
<!-- Container to render PDF -->
|
| 23 |
<div id="pdf-container"></div>
|
| 24 |
|
| 25 |
<script>
|
| 26 |
async function renderPdf() {
|
| 27 |
try {
|
| 28 |
const url = '/download-pdf';
|
| 29 |
+
|
| 30 |
+
// Load the PDF using PDF.js
|
| 31 |
const loadingTask = pdfjsLib.getDocument(url);
|
| 32 |
|
| 33 |
const pdf = await loadingTask.promise;
|