Quantcast
Channel: Adobe Community : All Content - Acrobat SDK
Viewing all articles
Browse latest Browse all 2571

Problems converting a Word document to PDF using Adobe PDF printer in .NET

$
0
0

I've been trying to get my .net web application to convert a word document to a PDF file using the Adobe PDF printer.

The script I'm trying to run is:

         Dim pProcInfo As New ProcessStartInfo

        pProcInfo.FileName = "C:\www\WordTemplate\Toconvert\File1.docx"

        pProcInfo.Verb = "Print"

        pProcInfo.CreateNoWindow = True

        pProcInfo.WindowStyle = ProcessWindowStyle.Hidden

       Dim pMyProc As Process = Process.Start(pProcInfo)

        pMyProc.WaitForExit()

 

I am running this on Windows Server 2008 R2 with Adobe PDF set as the default printer but running the above script just runs until it times out without producing the PDF. It's a small file only about 300KB. I've also tried running the executable AdobePDFPrintSilent.exe from the SDK in the script with the same result. Works fine if I run it on the server myself from the command line with the proper arguments but not from the .net application. I've given the IIS user account (IIS_IUSRS) Read & Execute, List folder contents, Read, and Write permissions to the folder as well and the NETWORK and NETWORK SERVICE accounts have the same. The Adobe PDF printer has permissions set to Everyone and I even included the IIS user account with the same permissions just to be sure. I have Word 2013 installed on the server as well. Is there just some permissions I'm missing somewhere?

Thanks for the help.


Viewing all articles
Browse latest Browse all 2571

Trending Articles