How to load a test pdf upon login in react

I have a js class where I need to display a default pdf file when user logs in. Any idea around it please?

Please post your code, explain exactly what you want it to do, and tell us what you’ve tried so far.

1 Like

You can probably just use embed tag:

<embed type="application/pdf" src="path/to/file" height="800" width="600">

I used PDFViewer library to display the pdf on load. However, now I need it to disappear as soon as the user performs any action such as changing tabs on the page or searching for some docs

It looks like there are many different libraries with names like PDFViewer for different platforms/languages. Which one are you using? Does it have documentation? What does the documentation say?

You also still haven’t posted your code or explained what you’ve tried so far.

1 Like