hey @geeky01adarsh, I believe you just don't want to display it right? In that case, you could use the @react-pdf/renderers pdf method and the file-saver package to achieve this.

import React from 'react';
import { saveAs } from 'file-saver';
import { pdf } from '@react-pdf/renderer';
import YourDocument from './YourDocument';

const DownloadButton = () => {
  const downloadPdf = async () => {
    const fileName = 'test.pdf';
    const blob = await pdf(<YourDocument />).toBlob();
    saveAs(blob, fileName);
  };

  return <button onClick={downloadPdf}>Download PDFbutton>;
};

export default DownloadButton;

this will convert your pdf component into a Blob and then saves it using saveAs method from file-saver

🌐
GitHub
github.com › wojtekmaj › react-pdf
GitHub - wojtekmaj/react-pdf: Display PDFs in your React app as easily as if they were images. · GitHub
Display PDFs in your React app as easily as if they were images. - wojtekmaj/react-pdf
Starred by 11K users
Forked by 999 users
Languages   TypeScript 94.5% | CSS 5.4% | HTML 0.1%
🌐
GitHub
github.com › diegomura › react-pdf
GitHub - diegomura/react-pdf: 📄 Create PDF files using React
📄 Create PDF files using React. Contribute to diegomura/react-pdf development by creating an account on GitHub.
Starred by 16.5K users
Forked by 1.3K users
Languages   TypeScript 82.5% | JavaScript 17.4%
🌐
GitHub
github.com › react-pdf-viewer › react-pdf-viewer
GitHub - react-pdf-viewer/react-pdf-viewer: A React component to view a PDF document · GitHub
A React component to view a PDF document. Contribute to react-pdf-viewer/react-pdf-viewer development by creating an account on GitHub.
Starred by 2.6K users
Forked by 296 users
Languages   TypeScript 97.5% | CSS 2.5%
🌐
GitHub
github.com › intelllex › react-pdf
GitHub - intelllex/react-pdf: Simple and fancy PDF Viewer based on pdf.js 📄⚡️
Simple and fancy PDF Viewer based on pdf.js 📄⚡️. Contribute to intelllex/react-pdf development by creating an account on GitHub.
Starred by 148 users
Forked by 37 users
Languages   JavaScript 85.3% | SCSS 14.7%
🌐
GitHub
github.com › pdf-viewer-react › react-pdf
GitHub - react-pdf-kit/react-pdf-viewer: React PDF Kit is a feature-rich React PDF Viewer component. Powered by PDF.js, it offers seamless integration with PDF documents. With customizable toolbars, search, and smooth navigation, it’s designed to deliver a professional PDF viewing experience.
React PDF Kit is a feature-rich React PDF Viewer component. Powered by PDF.js, it offers seamless integration with PDF documents. With customizable toolbars, search, and smooth navigation, it’s designed to deliver a professional PDF viewing ...
Starred by 29 users
Forked by 3 users
Languages   CSS
🌐
GitHub
github.com › diegomura › react-pdf › releases
Releases · diegomura/react-pdf
📄 Create PDF files using React. Contribute to diegomura/react-pdf development by creating an account on GitHub.
Author   diegomura
🌐
GitHub
github.com › topics › react-pdf
react-pdf · GitHub Topics · GitHub
The modern alternative to LaTeX. Create PDF documents templates using React, JSX, and Tailwind
🌐
GitHub
github.com › topics › react-pdf-viewer
react-pdf-viewer · GitHub Topics · GitHub
With customizable toolbars, search, and smooth navigation, it’s designed to deliver a professional PDF viewing experience. react javascript typescript reactjs nextjs pdf-viewer pdfjs react-pdf pdfjs-dist react-pdf-viewer pdf-viewer-react react-pdf-kit
Find elsewhere
🌐
GitHub
github.com › mikecousins › react-pdf-js
GitHub - mikecousins/react-pdf-js: A React component to wrap PDF.js
A React component to wrap PDF.js. Contribute to mikecousins/react-pdf-js development by creating an account on GitHub.
Starred by 803 users
Forked by 151 users
Languages   TypeScript 90.7% | JavaScript 6.9% | CSS 2.0% | HTML 0.4% | TypeScript 90.7% | JavaScript 6.9% | CSS 2.0% | HTML 0.4%
🌐
GitHub
github.com › ivmarcos › react-to-pdf
GitHub - ivmarcos/react-to-pdf: Generate pdf from react components · GitHub
Generate pdf from react components. Contribute to ivmarcos/react-to-pdf development by creating an account on GitHub.
Starred by 341 users
Forked by 68 users
Languages   TypeScript 86.4% | Shell 7.1% | JavaScript 5.5% | HTML 1.0%
🌐
GitHub
github.com › react-pdf-viewer
React PDF Viewer · GitHub
A rich features and powerful React component to view a PDF document - React PDF Viewer
🌐
GitHub
github.com › react-pdf-dev
React PDF · GitHub
With customizable toolbars, search, and smooth navigation, it’s designed to deliver a professional PDF viewing experience. There was an error while loading. Please reload this page. react-pdf-dev/react-pdf-viewer’s past year of commit activity
🌐
GitHub
github.com › michaeldzjap › react-pdf-sample
GitHub - michaeldzjap/react-pdf-sample: A react-pdf + react-window Sample Project
A react-pdf + react-window Sample Project. Contribute to michaeldzjap/react-pdf-sample development by creating an account on GitHub.
Starred by 44 users
Forked by 11 users
Languages   JavaScript 81.9% | SCSS 14.4% | HTML 3.7% | JavaScript 81.9% | SCSS 14.4% | HTML 3.7%
🌐
GitHub
github.com › wojtekmaj › react-pdf › releases
Releases · wojtekmaj/react-pdf
February 25, 2026 - Updated PDF.js to 5.3.93. Updated documentation on JPEG 2000 support. Updated dependencies. Exported LinkService type for convenience. usePageContext will now provide non-null value sooner than before, before the page is actually loaded. This is uniform with how useDocumentContext behaves and with how types were designed from the start, so you should not be affected by this change. React-PDF now targets es2018 and not es2017.
Author   wojtekmaj
🌐
GitHub
github.com › react-pdf-viewer › examples
GitHub - react-pdf-viewer/examples: React PDF viewer examples
React PDF viewer examples. Contribute to react-pdf-viewer/examples development by creating an account on GitHub.
Starred by 60 users
Forked by 35 users
Languages   TypeScript 99.8% | TypeScript 99.8%
🌐
GitHub
github.com › danomatic › react-pdf-html
GitHub - danomatic/react-pdf-html: Render HTML in react-pdf · GitHub
Render HTML in react-pdf. Contribute to danomatic/react-pdf-html development by creating an account on GitHub.
Starred by 212 users
Forked by 51 users
Languages   TypeScript 90.5% | JavaScript 9.5%
🌐
GitHub
github.com › react-pdf-dev › react-pdf-viewer
GitHub - react-pdf-dev/react-pdf-viewer: React PDF is a feature-rich React PDF viewer component. Powered by PDF.js, it offers seamless integration with PDF documents. With customizable toolbars, search, and smooth navigation, it’s designed to deliver a professional PDF viewing experience.
React PDF is a feature-rich React PDF viewer component. Powered by PDF.js, it offers seamless integration with PDF documents. With customizable toolbars, search, and smooth navigation, it’s designed to deliver a professional PDF viewing experience.
Starred by 25 users
Forked by 2 users
Languages   CSS 100.0% | CSS 100.0%
🌐
GitHub
github.com › aexol-studio › react-pdf-editor
GitHub - aexol-studio/react-pdf-editor: Pdf editor react component · GitHub
That is why React PDF Editor will help you create PDF files - one of the most important way business users shared documents. ... Install the dependencies and devDependencies and start the server. $ git clone https://github.com/aexol-studio/react-pdf-editor.git $ cd react-pdf-editor $ npm i $ npm start
Starred by 100 users
Forked by 19 users
Languages   TypeScript 98.6% | JavaScript 1.2% | HTML 0.2%