Created
          November 22, 2018 12:39 
        
      - 
      
- 
        Save farskid/4bebd569fe107db5e4e825975c741395 to your computer and use it in GitHub Desktop. 
    PDF reader in javascript
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | async function pdfViewer(pdfSrc) { | |
| let blob = await fetch(pdfSrc); | |
| blob = fetched.blob(); | |
| const url = URL.createObjectURL(blob); | |
| return <object data={url} type="application/pdf"></object> | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment