How to call pdfprint.exe from Server 2008 R2 IIS PHP to print the PDF files?

I’m testing out the product and I create my batch file and it runs fine manually triggering. I run this through my web (PHP) application and it seems to just stall. I’m wondering if there is a registration prompt or something that is holding it up, but since it is on the web services side I cannot see it nor does it get tot he point to log or capture anything. I’m on Server 2008 R2 IIS PHP. I have another application that runs through a command line and it runs fine, so curios on the registration might be holding it up?


If I run the batch file logged into the server then it runs fine and [prints to my local printer.
If I run the batch file through IIS then the message shows that it cannot find my printer DOIT, yet if I have it lists the printers then it shows DOIT. Any ideas?


If you call pdfprint.exe from IIS, it hasn't enough permission to print the PDF file to physical printer, so it will fail.

However, you can use "VeryPDFComRunCmd COM Component" to run pdfprint.exe from administrator user account, this will avoid the permission restrictions.

Please look at more information about "VeryPDFComRunCmd COM Component" from following web page,

The following is the PHP example to call pdfprint.exe application,


$strInFile = "D:\\VeryPDF\\test.pdf";
$strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX";
$strCmd = "D:\\VeryPDF\\pdfprint.exe $strLicenseKey \"$strInFile\"";

echo $strCmd . "\n";

$comobj = new COM("VeryPDFCom.RunCmd") or die("Couldn't create the COM Component");
$strCmd = $comobj->RunCmd2($strCmd, 5);
echo("Output is:\r\n" . $strCmd);


You can set "VeryPDFCom.RunCmd" to run inside administrator user account, please look at more information from following web page,

Please look at more articles in VeryPDF Knowledge Base,


VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)

Related Posts

One Reply to “How to call pdfprint.exe from Server 2008 R2 IIS PHP to print the PDF files?”

  1. We are using the PDF command line tool from an IIS website. We call the process using System.Diagnostic.Process but it fails silently? Can you help provide some info on KB on this, has this been raised before – do we need to change some security?

    This has become urgent for us.
    Thanks for your message, in general, this problem is caused by permission restrictions of IIS Service, please look at a solution from following web page,

    Because IIS Service is run from Local System user account, this user account has some restrictions, you can use “VeryPDFComRunCmd COM Component” to switch from Local System user account to administrator or an interactive user account, then you can print PDF files properly.


    VN:F [1.9.20_1166]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.20_1166]
    Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!