DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 967,611 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Render a pdf in react app
Aishanii
Aishanii

Posted on

Render a pdf in react app

If you want to render a pdf file in a react app, there are different options out there. The one that I recently used and would recommend for beginners is react-pdf.

npm install react-pdf

For activating links:
import 'react-pdf/dist/esm/Page/AnnotationLayer.css';

Check out the script example here:
https://github.com/Aishanipach/React-pdf-devto

Top comments (3)

Collapse
 
janpauldahlke profile image
jan paul

full docs, for those who care about real creds and READMEs

react-pdf.org/

Collapse
 
aishanipach profile image
Aishanii Author • Edited on

Added to my readme too, thanks!

Collapse
 
janpauldahlke profile image
jan paul

Good decision.

Our newest Hackathon

Join the DEV x MongoDB Atlas Hackathon 2022 and use your ingenuity and creativity to build an application using MongoDB's cloud based developer data platform, MongoDB Atlas.

β†’ Get Started