DEV Community

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 • Edited

Added to my readme too, thanks!

Collapse
 
janpauldahlke profile image
jan paul

Good decision.