File size: 1,594 Bytes
d6b8d19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
53
54
55
56
57
58
# Original PDF master thesis {.unnumbered #sec-chap_Orig_Master_PDF}

<!-- load dot lotti js code -->
<script src="https://unpkg.com/@dotlottie/[email protected]/dist/dotlottie-player.js"></script>

<!-- the riksha file is obtained through:https://lottiefiles.com/103030-rickshaw-from-pakistan
and https://lottiefiles.com/ranaadeelfarrukh -->
<dotlottie-player
  autoplay
  loop
  mode="bounce"
  src="../7_Animation/Riksha.lottie"
  style="width: 100%">
</dotlottie-player>

<style>
    #pdf_Iframe {
      width: 100%;
      height: 97%;
      border: 1px solid #ccc;

      /* have it hidden at the inital loading of this page */
      display: none;
    }
</style>

  <iframe id="pdf_Iframe"></iframe>

  <script>

    document.addEventListener('DOMContentLoaded', function() {
      // Code to be executed after the DOM has been loaded
      openPdf();
    });

    const url = 'https://huggingface.co/spaces/JavedA/master_Thesis/resolve/main/Data/11_True_Master/Master_Thesis_Javed_Butt.pdf';

    // download the pdf using the url provided above
    function openPdf() {
      fetch(url)
        .then(response => response.blob())
        .then(blob => {
          const blobUrl = URL.createObjectURL(blob);
          const iframe = document.getElementById('pdf_Iframe');

          // get lottify riksha
          const loadingAnimation = document.querySelector('dotlottie-player');

          // Hide the loading animation
          loadingAnimation.style.display = 'none';


          iframe.style.display = "block";
          iframe.src = blobUrl;

        });
    }
  </script>