![]() ![]() ![]() See more WebViewer events such as documentLoaded to understand when to execute API operations. Below is some example code showing how to convert base64 to a Blob. If you want to include a PDF as a subpart of a web page, use an iframe as described in Method1. Here, we have mentioned two ways to display PDFs on a web page. import testPdf from './Test.pdf' Then, in the App component, I will add an iframe and give it a src attribute with the testPdf like so. I added a test PDF file in the src folder and we will first import it into the App.js file. PHP provides simple functionality to embed PDF files. Display a PDF with iframe We will be using a basic React app using create-react-app and in it, we will render an iframe. If you have the file data as a base64 string, the best way to load the document in WebViewer is to first convert it to a Blob and then load it as described for Blobs. PDF is one of the most trusted document formats.
0 Comments
Leave a Reply. |