- Home /
Open a .pdf file after take the build from windows
Hi,
I have project which is have this function. After i take the build i need to open the pdf file. I had one button in my scene i did code for that button when i click that button tha pdf should open.
I use this code to do that function:
System.Diagnostics.Process.Start("AcroRd32.exe", "AC_Data/Resources/Test.pdf");
i copy my pdf file in Data/ Resources folder and i use that above code. But its not open i dont know whats the problemm in this. please help me to find the solution its very urgent
Regards, SChetty
Answer by clunk47 · Jun 11, 2013 at 05:20 PM
I got this working on my end. At first I got an "Access Denied" error in reader, but just had to right click on pdf file in explorer, then unblock the file. You shouldn't have that problem, just try this:
using UnityEngine;
using System.Collections;
using System.Diagnostics;
public class AcroTest : MonoBehaviour
{
ProcessStartInfo process;
void Start ()
{
process = new ProcessStartInfo("AcroRd32.exe", Application.dataPath+"/Resources/Test.pdf");
Process.Start(process);
}
}
Answer by pittyjones235 · Oct 28, 2013 at 08:29 PM
PDF docs can be opened with the help of pdf file recovery
Your answer
![](https://koobas.hobune.stream/wayback/20220613103942im_/https://answers.unity.com/themes/thub/images/avi.jpg)