# Using pdf.js in a bubble.io html element

**URL:** <https://pdfjs.community/t/using-pdf-js-in-a-bubble-io-html-element/2652>\
**Category:** Technical Support\
**Created:** [June 17, 2023, 2:14am UTC](https://pdfjs.community/t/using-pdf-js-in-a-bubble-io-html-element/2652 "2023-06-17T02:14:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shobbs](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shobbs](https://pdfjs.community/u/shobbs)\
**Post date:** [June 17, 2023, 2:14am UTC](https://pdfjs.community/t/using-pdf-js-in-a-bubble-io-html-element/2652/1 "2023-06-17T02:14:58Z")

</div>

I am using an HTML element in my [bubble.io](http://bubble.io) application. Using the free pdf.js express. This is the code ive been playing with but all that shows up is the pdf express webpage and no viewer. there is also a 404 error. is there something simple im missing or is it related to DNS?

````javascript
<div id="pdfViewerContainer">
  <iframe id="pdfViewerFrame" src="https://pdfjs.express/Viewer_v2.7.34/web/viewer.html?api_key=xxxxxxxxxxxxxxxxxxxx” style="width: 100%; height: 600px; border: none;"></iframe>
</div>

<script src="https://pdfjs.express/Viewer_v2.7.34/lib/pdf.min.js"></script>
<script>
  var pdfUrl = "https://example.com/path/to/your-pdf-file.pdf";
  var viewerContainer = document.getElementById("pdfViewerContainer");
  var viewerFrame = document.getElementById("pdfViewerFrame");

  viewerFrame.onload = function() {
    var pdfViewer = viewerFrame.contentWindow.PDFViewerApplication;
    pdfViewer.loadDocument(pdfUrl);
  };
</script>```
````

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [June 19, 2023, 3:48pm UTC](https://pdfjs.community/t/using-pdf-js-in-a-bubble-io-html-element/2652/3 "2023-06-19T15:48:23Z")

</div>

Hi there,

Thank you for reaching pdf.js express forums,

PDF.js express does not have a CDN:

> [@Is there any CDN url for PDFJS express library](https://pdfjs.community/t/is-there-any-cdn-url-for-pdfjs-express-library/910/2):
>
> Hello, I’m Ron, an automated tech support bot robot While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages: Guides: [Integrating existing Angular project with PDF.js Express - Setup](https://pdfjs.express/documentation/get-started/angular/exist-project#setup)[Set up real-time collaboration](https://pdfjs.express/documentation/collaboration/setup)[Integrating Vue.js with PDF.js Express JavaScript PDF library - Sample overview](https://pdfjs.express/documentation/get-started/vue#sample-overview) APIs: [PDF.js Express Utilities](https://pdfjs.express/api/utils/index.html#__anchor)[UndefinedWebViewer(options, viewerElement)](https://pdfjs.express/api/global.html#WebViewer__anchor)[VerificationOptions](https://pdfjs.express/api/VerificationOptions.html#__anchor) Forums: [Evaluating PDF.Js Expres…](https://pdfjs.community/t/evaluating-pdf-js-express-as-alternative-for-pdf-js/474/6)

Is there a path to your lib folder containing the static assets somewhere? Is it being properly referenced in your application?

> **[Loading PDF.js Express from a CDN or another origin | Documentation](https://pdfjs.express/documentation/learn-more/cors)**

Could you please share a screenshot of console error messages and any failed network requests?

Best regards,  
Kevin Kim
