vinodnimbalkar / svelte-pdf

svelte-pdf provides a component for rendering PDF documents using PDF.js
https://www.npmjs.com/package/svelte-pdf
MIT License
203 stars 49 forks source link

Unable to open 'pdf.js' #6

Closed markfirmware closed 3 years ago

markfirmware commented 3 years ago
<script>
  import PdfViewer from "svelte-pdf";
</script>

<PdfViewer url='https://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.1.pdf'></PdfViewer>
vinodnimbalkar commented 3 years ago

there is another problem with url because https url "https://nearlaw.com/PDF/SC/2000/2000-ALL-SCR-1.pdf" and few other https url has tested, its working fine. https://codesandbox.io/s/svelte-pdf-govhm?file=/App.svelte

markfirmware commented 3 years ago

I discovered that it is blank for a period of seconds then

Unable to open 'pdf.js': File not found (file:///sandbox/node_modules/pdfjs-dist/build/pdf.js).

This occurs with my url but not with yours.

markfirmware commented 3 years ago

@vinodnimbalkar

Your sandbox

https://codesandbox.io/s/svelte-pdf-govhm?file=/App.svelte

now fails consistently. It takes about thirty seconds to get:

Screenshot from 2020-10-19 20-24-15

markfirmware commented 3 years ago

Closed pending resolution of https://github.com/vinodnimbalkar/svelte-pdf/issues/8