you can use ViewerJS for that. It works perfect. There is no UE4 side coding.
Quick Instruction:
- Download “Viewer JS” ViewerJS Get ViewerJS
- Install Wamp (you can use another server)
- Create a folder in “www” with a name which you desire (mine is PDF_Viewer)
- copy “ViewerJS” folder and its contents from zip to created folder in www
- Create another folder in PDF_Viewer (or what you call your first created folder) (mine is PDFs)
- start wamp
- Point UE4 Web Browser Widget to “localhost/PDF_Viewer/ViewerJS/#…/PDFs/file.pdf”
NOTE:
With this JS, you can show “.pdf / .odt / .ods / .odp” files
ODT = Open source version of .docx. Word can export
ODS = Open source version of .xlsx. Excel can export
ODP = Open source version of .pptx. Power Point can export.
License of JS is Apache 2.0