Was wondering if this is possible? It seems likely that it is, but there are a couple of questions regarding it that I do have:
- Ease of implementing the Adobe Reader API into the engine: API Documentation Reference
- Text readability within the “game”… this is especially a question in regards to using VR HMD’s.
The next thing would be to create a file “directory” which would bring up a “Choose folder location”, and then set a “Document reader” type of thing to list all files within that directory. When the user selects the file, then the book opens up or something to allow the person to read the book while in VR. Seems like an interesting project at least.
I might be able to do this using the Web Browser widget. It occured to me after posting, although I’ll need to test it. Hopefully it has the ability to read PDF’s which all web browsers should be able to
Edit: After testing, the web browser widget does in fact show the directory, however, when the URL is pointed to the .pdf, nada, just a blank “screen”… or would that be a blank widget? Confusing, I know.
One other thing was that text readability in the web browser, at “book sizes” in VR makes the text almost unreadable. The DPI of the Rift just isn’t high enough :\
This is a really interesting idea, but I agree that the standard book font size may be too small to read and the rendering fidelity on text in general is only so-so in a VR headset.
Have you tried VaQuole to view the pdf files?
Interesting, I didn’t even know VaQuole existed I’ll give it a shot.
I actually already tried it with no success. =( Now if only there were a standardized way to turn pdf, or any book/ebook pages into web pages…
You’d probably be better off using some web service to convert PDF files to images instead of trying to implement a PDF viewer in-engine.
Is there a better solution for this now?
Maybe a command line tool that converts the PDF into images would be an easier approach? With the number of open source PDF rendering engines out there, surely something like that exists.
Any movement on this idea? It would appear there’s a few people looking to do just this.
Also Higher Res VR headsets are getting released now so this may have a lot more real world application these days
you can use ViewerJS for that. It works perfect. There is no UE4 side coding.
- 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”
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