Print PDF with ASP.NET and Acrobat Reader

New Here ,
Jan 19, 2018

Copy link to clipboard

Copied

I have a web application on a server with Windows Server 2008 R2 and I’ll print a file pdf (on server-side).

  • Printers are shared printers, physically connected to another server (Windows Server 2008 R2)
  • 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)
  • Everyone group can print, manage printer and document on the shared network printer.
  • Everyone group have full control on process AcroRd32.exe

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;
printPdf
.Start();
printPdf
.WaitForExit();
printPdf
.Close();

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:

Process.Start(@"...\Print.pdf");

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

TOPICS
Acrobat SDK and JavaScript

Views

639

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Print PDF with ASP.NET and Acrobat Reader

New Here ,
Jan 19, 2018

Copy link to clipboard

Copied

I have a web application on a server with Windows Server 2008 R2 and I’ll print a file pdf (on server-side).

  • Printers are shared printers, physically connected to another server (Windows Server 2008 R2)
  • 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)
  • Everyone group can print, manage printer and document on the shared network printer.
  • Everyone group have full control on process AcroRd32.exe

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;
printPdf
.Start();
printPdf
.WaitForExit();
printPdf
.Close();

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:

Process.Start(@"...\Print.pdf");

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

TOPICS
Acrobat SDK and JavaScript

Views

640

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 19, 2018 0
New Here ,
Feb 21, 2018

Copy link to clipboard

Copied

Hi, did you find the solution? Or how did you make the work around?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2018 0
Most Valuable Participant ,
Feb 21, 2018

Copy link to clipboard

Copied

The solution is not to use Acrobat or Acrobat Reader. Neither one is for server use.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2018 0