How to Embed PDF Document From URL in IFrame Tag in Browser Using React.js Full PDF Viewer or Reader Full Project For Beginners

 

I think this might be more of what your after. I wrapped it in a component for you already but this is a document viewer which can view PDF documents with out much work.

import  React,{  Component } from 'react';
import ReactDOM from 'react-dom';


class DocView extends React.Component{

    constructor(props){
        super(props);
    }

    render(){
        var url = "https://docs.google.com/viewerng/viewer?url="+this.props.src+"&embedded=true";
        return(
            <iframe style={this.props.style} src={url}></iframe>
        );
    }
}

export default DocView;

Leave a Reply