Print PDF with ASP.NET and Acrobat Reader


  • I have a web application on IIS and I’ll print a file pdf.

    • Printers are shared printers, physically connected to another computer.
    • The website have an Application Pool Identity and the virtual account (DomainName\NameComputer$) have full permissions on printers.
    • ‘IIS APPPOOL\NameAP’ have full control on Acrobat Reader (AcroRd32.exe)
    • Operation Systems: Windows Server 2008 R2

    I use Process class with this code:

    ProcessStartInfo infoPrintPdf = new ProcessStartInfo();
    infoPrintPdf.FileName = pathPdf;
    string printerName = "\\namePC\namePrinter";
    infoPrintPdf.FileName = "...\AcroRd32.exe";
    infoPrintPdf.Arguments = string.Format("/t {0} \"{1}\"", 
        pathPdf, printerName);
    infoPrintPdf.CreateNoWindow = true;
    infoPrintPdf.UseShellExecute = false;
    infoPrintPdf.WindowStyle = ProcessWindowStyle.Hidden;
    Process printPdf = new Process();
    printPdf.StartInfo = infoPrintPdf;

    Process AcroRd32.exe remains in running state and don’t print. Any idea?

    I try to open file pdf on server and doesn't work. An extract:


    The process AcroRd32.exe is in running with username ‘IIS APPPOOL\NameAP’. With Visual Studio in debug this code works.

    IIS APPPOOL accounts have limits with Acrobat?

    Thursday, January 18, 2018 12:23 PM