24
Views
6
Comments
[pdfJS Viewer Reactive] Preview a PDF that is stored in the database
Forge component by Eduardo Jauch
3
Published on 15 Jan 2020
Application Type
Reactive

I am trying to display in a screen a pdf that is stored in a db table.

I tried to pass the url of a REST that returns the pdf content as a binary but didn't work. Is there a way of achieve what i want?

Rank: #217

Hi André,

You can preview a PDF file in react apps using an iframe:

For this, you need to convert your binary to Base64 using this function:


Regards,

Paulo