Due to several requests I have decided to add a PDF viewer. There is now also a mobile version with less features but for viewing PDF files it should be enough. The PDF must be loaded via Blueprints or C++ in the mobile version. See below.
For this I took the Javascript Framework PDFjs and modified it to work in the UE4 Browser. Additionally I created some Functions to load PDFs via UE4.
The scrolling is sometimes a little jerky. See the video.


Only the PDF part is described here. Please read the other parts of the documentation as well.

First you should download the pdfviewer.html or pdfviewer_mobile.html file and save it in your project in the Content directory.
Then you can load the file into the browser widget. Here is the html source code in case someone wants to customize the viewer.

In this example the file is located in the subdirectory "HTML".




If you want to use desktop and mobile at the same time.





PDF viewer should already work. Here is a video with a 60MB PDF file with many images.


Mobile Version.
Important! Android users please click on "Communication between Javascript and Blueprints" on the left and scroll all the way down.



You can use the node "Load PDF File Into Viewer" to load a PDF file from the game directory, somewhere on the hard disk or from a .pak file via UE4.




If you want to load a PDF into the viewer directly after starting it, you can do it this way.




You can perform various functions via Javascript. Please have a look at the PDFjs documentation to find out what is possible. Here is an example where I change the page to the first page.

PDFViewerApplication.pdfViewer.currentPageNumber = 1




With the node "Load All Files from Directory" you can create a list with all PDF files in a directory. You can use this list with the previous node to load a PDF.