I want to open a PDF file in the browser but instead of opening, it is downloading. I do not want to change the default settings of the browser.
If there any PDF viewer package which is easy to use, please refer. I tried like this
first import the pdf
import Pdf from "../../../assets/pdf/abc.pdf";
then tried to open it like this
<a href={Pdf} target="\_blank" className="btn"\>Learn More</a>
But it is downloading the file. But I want to open it.


If you are using Chrome browser, select the three vertical dots in the upper-right corner. Choose Settings > Advanced > Privacy and security. Select Site Settings > PDF documents. Use the toggle switch next to Download PDF files instead of automatically opening them in Chrome to turn the feature on and off.