501
Views
4
Comments
Solved
[pdfJS Viewer] Support for blob - display PDF generated in javascript
Question
pdfjs-viewer
Web icon
Forge asset by Eduardo Jauch

Hi Team

Does this component support viewing a blob (PDF generated with JavaScript)?

I have tried some other options, i.e. using <embed>, <object>, and <iframe> to display the pdf but none of them worked.

Regards
Hanno

2020-02-28 09-46-54
Eduardo Jauch
Solution

Hello Hanno,

The way the code is and the component was build around it requires that the PDF be passed in an URL.

I'm pretty sure that should be possible to change the code (and the component) to accept blobs, given they are valid PDF, but I have to check.

Unfortunately, we will not be able to make changes to the component until January.

It is in our list of ToDos.

Cheers

Eduardo Jauch

2025-09-25 22-50-38
Hanno

Thank you, Eduardo, I appreciate you taking the time to provide feedback. Looking forward to the changes being implemented next year.

Hanno

2021-07-21 12-04-07
George.Qiao

I would like the pdfjs viewer to support blob. I have an app to download pdf from Azure blob storage and i would like to show the pdf inside the app

2020-02-28 09-46-54
Eduardo Jauch

Hi George,

For now, the only way to provide a PDF to the component is through an URL.
You can implement a page to download your PDF from Azure. In the preparation, you retrieve the blob and use a Download node to return it.

From the page with the view, you use the URL of your page as the source of the PDF.

Hope this can help you.

Cheers.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.