/// OLD POST I find a javascript which works perfectly with UE4 Native Web Browsers. Maybe you can look it.
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.
this JS does not require scr script html tags. But URL must contain “#…” after “ViewerJS” point. This syntax will load js and go to your document. if you use it with “a href=”#" you need to write just URL with #…
License of this JS is Apache 2.0
Load time takes some seconds depends on your document.
Hi, I’m only just starting to get my head round UE, but this looks like it has potential for us. We’re looking to find a way to give some campus estates managers a digital model of their buildings, but one big query was how they’d access PDF drawings of their site from the UE application.
Could you please explain where I’d have to do the installing? Am I right in thinking that our client would potentially have to set up a web server to access something like this? In which case, we’d aim to install both the UE application and WAMP on it?
If you want to access PDFs from multiple computers, you should use external web server. You dont need to install wamp or any other web environment to every client pc. That WAMP method is a suggestion for one PC scenario.
1- Install your favourite web environment (Apache, Nginx or IIS) to your external server.
2- Copy PDF.JS or Viewer JS to web server’s root. For example wwwroot
3- Copy your PDFs to necessary folders.
If you want to use UE4 to create an interface, you can use “append” to bend URL string with your desire.
For example
Launc URL
Append:
A: http://192.168.X.X:80/
B: PDF.JS/web/index.html?file=/PDF.JS/pdfs/
C: string variabe
If user clicks a widget, set string variable like something.pdf
And connect it to click event.
You can find sample PDF JS and Viewer JS server installations in my GitHub. Also you can use Github Pages for server environment, too.