Just display local PDF file in React web application
P粉653045807
P粉653045807 2024-02-25 14:56:23
0
2
380

I'm making a portfolio website for myself as a React web app. I would like to have a resume page on the website that only displays my resume. When I originally made the HTML version of the site, I was able to use iframes to achieve this.

When I try this in React, the iframe displays a copy of the currently displayed page instead of my pdf. Is there an easy way to display a locally saved pdf in a web application?

P粉653045807
P粉653045807

reply all(2)
P粉007288593

You can use the built-in <embed> tag in HTML.

For example, the following format displays a pdf document at the given path with a width of 150% and a width of 650 pixels.

You can adjust the width and height as needed.

P粉356128676

Any browser « Use _Embeddable Google Document Viewer to embed PDF files into iframes.

I'm not sure what you mean by "display a copy of the currently displayed page" You can provide more information via screenshots. You can also use the pdf from googleDocs instead of storing the pdf in your project.
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!