Marthee commited on
Commit
20e8a77
·
verified ·
1 Parent(s): 20eef6f

Update templates/gui.html

Browse files
Files changed (1) hide show
  1. 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://mozilla.github.io/pdf.js/build/pdf.js"></script>
10
 
11
  <style>
12
  canvas {
@@ -19,13 +19,15 @@
19
 
20
  <h2>PDF Viewer</h2>
21
 
22
- <!-- Container where PDF content will be rendered -->
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;