Error -2 with Server 2013, upgraded from Server 2009
Whenever a client attempts to run this basic PrintToPDF sample a -2 error is returned:
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
- Uninstall Server using Add/remove programs
- Delete the following directories
- C:\Program Files\ActivePDF
- Check to see if thisregistry key exists and delete it:
- Check to see if the dllexists in the following two folders and delete it:
You are now ready to reinstall Server, and PrintToPDF will perform without a problem.