Error -2 with Server 2013, upgraded from Server 2009

Whenever a client attempts to run this basic PrintToPDF sample a -2 error is returned:

Probable Cause

This is caused by the printer not being created with all of the data. You can confirm this issue by opening the Printer Properties:

Properties > Ports > Configure Port

If this is the problem, the values for Redirect this port to the program and the Arguments for this program are are blank.

This information is created during installation and stored in the APS_Config.ini file located at:

If this data exists then there may still be some stray remnants of the 2009 version that need to be removed. This results from the legacy 2009 files causing Server to look for the APS_Config.ini file in the C:\Windows\ActivePDF\APSMon instead of the C:\ProgramData\ActivePDF\APSMon directory.


A clean reinstall is recommended.

To Perform a Clean Uninstall

  1. Uninstall Server using Add/remove programs
  2. Delete the following directories
    • C:\Program Files\ActivePDF
    • C:\Windows\ActivePDF
    • C:\ProgramData\ActivePDF
  3. Check to see if thisregistry key exists and delete it:


  4. Check to see if the APSMonnt.dll exists in the following two folders and delete it:
    • C:\Windows\System32
    • C:\Windows\SysWOW64

You are now ready to reinstall Server, and PrintToPDF will perform without a problem.