Displaying a pdf image in Unity?

New to Unity, here–I checked around the forums but may have missed a post where this has been discussed.

I’m trying to import a flat image with vector information so I can zoom in with the camera without introducing a lot of nasty pixelation. I chose a pdf, but Unity doesn’t seem to recognize it as an image.

There are images and text on this graphic so any pixelation is pretty noticeable.

Is there no support for pdfs? Am I going about this the wrong way? Thanks for any help you can provide!

There isn’t any support for pdfs…that’s not the sort of thing that you’d normally use in a 3D engine. Theoretically you could write a pdf importer and renderer, but that would be a big project.

–Eric

Okay. I guess I’ll have to figure out another way to display these images.

Thanks!

i was looking for the same feature (since i develop architectural projects, and often the user wants the maps in pDF!

so i was thinking:

  • for standalone projects, if possible to “open” external files, that would be opened with preconfigured applications (like Acrobat reader)
    -for online projects: to use javascript as interface to open the pdf in a news browser window (for inline display or download)

what do you think?

stefano

Application.ExternalEval(“window.open(‘your.pdf’)”);

thank you!
it seems to work only in the webplayer

i think we have to write a plugin to make it work in standalone projects, what do you think?

Correct

ExternalEval sends a browser JS script for executation to the window its running in. so if it isn’t in a browser, then there is nothing to execute it in

This will work as long as you have a PDF viewer and .PDF files are automatically opened by it:

Application.OpenURL(pathToYourPDF);

I have two questions on this subject.

I get a webpage to come up with this call:

Application.OpenURL (“http://www.daevfinnstudio.com/”);

however I’m not able to make it work for a pdf file. I’ve even tried to be explicit in my file path:

Application.ExternalEval(“window.open(‘/Volumes/ARCHETYPE_D2/GAME_STUDIO/LIE_TO_ME/Assets/DaevAssets/Penelope.pdf’)”);

alternately:

Application.ExternalEval(“window.open(‘Penelope.pdf’)”);

This has not worked as of yet, my pdf was in the same folder as my Unity scene, I tried moving the pdf into my assets folder.

Any thoughts about how to get this to work above?

SECOND QUESTION:

Finally: I have a client who wishes to pull data out of microsoft outlook. The file format is .aspx. I think I’d settle for launching microsoft outlook. Does anyone has any ideas on how to attempt this, or if reading in data from an .aspx file is possible into Unity?

thanks

I think you can use a pdf viewer which can extract PDF or save PDF page as images. And such a resource can be find on google.