Check out example codes for "html to pdf". It will help you in understanding the concepts better.

Code Example 1

<!-- Answer to: "html to pdf" -->

<!--
  A link to a useful HTML to PDF converter (and looks nice):
  https://html2pdf.com/
-->

Code Example 2

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <h1>PDF Example with iframe</h1>
  
 		   
    <iframe src="link/to/your.pdf" width="100%" height="500px">
    </iframe>
 
  
  </body>
</html>

<!-- insta: @hardcode_studios -->

Learn ReactJs, React Native from akashmittal.com