skip to Main Content

I am making a portfolio website for myself as a React webapp. I would like to have a Resume page on the website which would simply display my Resume. When I had originally made a HTML version of my website I could achieve this with iframe.

When I’ve tried this in React the iframe display a copy of the current display page instead of my pdf. Is there a simple way to just display a pdf saved locally in the webapp?

2

Answers


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

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

    <embed src="/path/to/your/pdf" width="100%" height="600px" />
    

    You can adjust the width and height as you want to fit it.

    Login or Signup to reply.
  2. Any Browser « Use _Embeddable Google Document Viewer to embed the PDF file in iframe.

    <iframe src="http://docs.google.com/gview?
    url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true"
    style="width:600px; height:500px;" frameborder="0">
    

    I am not sure what does it mean ” display a copy of the current display page”
    You can provide more information with screenshot.
    Also you can use pdf from googleDocs instead of storing pdf in your project .

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search