OpenInputFile Returns -1

The Toolkit OpenInputFile method returns an error of -1.

Probable Cause

  • The output file is already open
  • The input file's security settings do not allow the PDF to be copied unless passwords have been entered.

NOTE: Versions of Toolkit prior to 4.2.0 are not able to open a PDF created using PDF standard 1.5.


  1. Ensure that the output file is not already open. Close the file, and then attempt the conversion.
  2. Determine if the error is due to the input file's security settings.
  3. Open the PDF using Adobe® Reader. When the file is opened in Reader, press Ctrl+D, then click the Security tab. A list of actions requiring passwords appears.
  4. If you have the necessary passwords, enter them using the SetInputPasswords method, which will allow Toolkit to process the PDF.