- Home /
Viewing a PDF from within Game
Hi all,
I am trying to create a game where the left and right arrows can change the pages of a pdf that is displayed within the game. Is something like this possible? Please let me know. Thanks!
Answer by YoungDeveloper · Dec 07, 2013 at 06:24 AM
Probably simplest solution would be rendering each page as a simple texture. You can save each page as a separate image file, in unity create an array of texture2d, so to scroll through pages you could just call - change index of the array to render, pretty much straightforward. But to read PDF file automatically and somehow show it inside unity in automated way will much much more complicated than my previous mentioned solution, but possible. Check out asset store, maybe there is already something to this related.
edit: check out this thread http://answers.unity3d.com/questions/186620/displaying-pdf.html
How exactly do you put a page into an image file? It sounds like a good way but I have no idea how you would do this.
Unity won't do it. You could look into Image$$anonymous$$agick and Ghostscript. Ghostscript has a .NET library but I think it requires a higher version of .NET than the one in Unity.
if i have more the 5000 pages in pdf? what should i do ? array of 5000 indexes? I mean, i am not insane
Your answer
Follow this Question
Related Questions
PDF scripting reference? 1 Answer
Displaying PDF in unity 5.1.2f1 0 Answers
scripting, where can i learn it? (JavaScript) 1 Answer
How to insert comment and delete in PDF ? 2 Answers
Unity3D-5 game in flex 1 Answer