Document Viewer for pdf and txt files

Document Viewer for pdf and txt files
In this article we are going to use document viewer to view .pdf/.txt files in the browser. Many applications required to show some documents to the user or user would like to see some documents uploaded by them.

The document viewer which has been used in this code is open-source and is available for download in Git. You can download ViewerJS from this site.

Now let us see an example of ViewerJS.

Once ViewerJS has been downloaded, Include that inside the project.

DocumentViewer.html

Note: Please make sure .txt/.pdf files are stored inside ViewerJS folder

screen1

We are going to use document viewer to display MyFile.txt and myfile.pdf in the browser using ViewerJS document viewer
op1
op2 op3

 

Leave a Reply

Your email address will not be published. Required fields are marked *