Displaying PDF files in a build

Hi All

I know that this topic has been discussed a few times over the last few years, but no general consensus seems to have been reached and there might be new tools available. My project needs the capability to open a PDF when a button is pressed, and I’m after the best way to approach this task.

I can use the Application.OpenURL function to open an online PDF but it has a few downsides:

  1. It must be an online PDF - would prefer to have PDFs saved with the build.

  2. It will only open the PDF in a web browser, which in turn just downloads it to be viewed in the PDF viewer (Polaris Office 5 in my case).

  3. Because of this, its not a seamless process - I click the button, it asks what program to use to complete the action, it opens the browser with an empty page as the PDF is sent to the android download queue, which I then must drag down the status bar and click on the downloaded PDF to finally open in the PDF viewer. Phew!

Does anyone know if there’s anything out of the box that would simply open the PDF full screen with one click from Unity, and preferably with an easy way of getting back into Unity afterwards without having to access the task manager?

Or should I be looking at converting the PDF at runtime to an image file and creating an overlay GUI as some sort of ‘PDF Viewer’ from within Unity?

Thanks everyone!

It would be easier to convert the .pdf files to images, if you don’t need any interactive PDF features.

There are some Android libs for PDF viewing if you want the whole kitchen sink solution

http://plugpdf.com/