Link to home
Start Free TrialLog in
Avatar of jknj72
jknj72

asked on

Using pdftk.exe from ASP.NET application

I have a web app that has a grid and you can select multpile PDFs from the grid and hit a button and pdftk.exe will run and merge these files and display them within a browser. I have this working when I test it on my local machine but when I publish and hit the button, with multple PDFs selected, it times out.  I have error handling and it does not fall into it and I am also writing a log file and it is stopping on the line of code where the pdftk.exe tool is executing. Here is the line that it hangs at.,..

Dim p As New ProcessStartInfo(HttpContext.Current.Server.MapPath("..\bin")
 & "\pdftk.exe", rstr.ToString)
            HttpContext.Current.Server.MapPath("..\bin")
            'process
            p.UseShellExecute = False
            p.WindowStyle = ProcessWindowStyle.Hidden
            Process.Start(p)  ------HANGS HERE

Can someone please help me with this because the metowrk guy is of no help at all and I need to get this out to production
Avatar of JamieTownsend
JamieTownsend

Is the version of pdftk you have running locally the same version on the box you "published" and are running it from ?
Avatar of jknj72

ASKER

yes it is inlcuded it in the application.
And p.UseShellExecute = False is set to True, I was just trying to test if that was the issue but when False nothing happened.
ASKER CERTIFIED SOLUTION
Avatar of Alan Warren
Alan Warren
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jknj72

ASKER

thanks