Displaying PDF

Hi, i’m trying to display a PDF file on my Mac standalone application and i have no idea how to do it.
Any ideas, maybe somebody could help me?

Thanks, best regards.

You need to look up the PDF file format and create you’re own custom PDF renderer.

Try looking through this stackoverflow thread:

http://stackoverflow.com/questions/518878/how-to-render-pdfs-using-c-sharp

Instead of using a custom PDF renderer (which could be overkill, depending on your needs), you could either

  • Preprocess the pdf to an image
    format, put it in a folder with the
    PDFs original name, and write some code to
    represent it like a single document
    with many pages. This is by far the
    simplest way.
  • Do the preprocessing on
    the fly (you select a PDF to show in
    Unity on runtime → Unity starts e.g. a PDFTK
    process (I don’t know if there is a
    nice PDF command line toolkit for
    Mac, tough) to let that render the
    PDF into PNG in the background → see
    first solution). This would allow you
    to use any PDF you want.

Edit:
From Rod Green’s answer, I came to this link with two clicks:
Using Ghostscript for PDF > JPG conversion
Ghostscript (which is a pdf renderer) should even be available for Mac.

This may not provide the user experience you want, but worth mentioning that the Application.OpenURL method will open a browser to the provided URL, which you could use to display PDF files from the web (http:// URL) or local storage (file:// URL).

This seems to do a good job: francescogallorini.com - francescogallorini Resources and Information.. It doesn’t require extra libraries.

I know I am posting offtopic question here , since i was unable to find any post regarding the sharp pdf with unity3d I am using the sharp pdf package with unity3d and i am facing difficulties for windows platform like:

  1. How to dynamically increase the column height according to the text size at runtime.
  2. How do i insert an image without using the co-routine function.
  3. How to dynamically write the data on the new page if current page is filled and data is still pending. For example, there are 50 rows in my table at runtime and one first page 30rows occupy the space, then how do i dynamically write the remaining 20 rows on second page.
  4. Instead of storing the file in root folder, in assets folder , how can i store the pdf at different location by selecting the folder from the system.

Can anyone please help me out, it would be great help…Thank you in advance.