OpenInputFile Returns -1
The Toolkit OpenInputFile method returns an error of -1.
- 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.
- Ensure that the output file is not already open. Close the file, and then attempt the conversion.
- Determine if the error is due to the input file's security settings.
- Open the PDF using Adobe® When the file is opened in Reader, press Ctrl+D, then click the Security tab. A list of actions requiring passwords appears.
- If you have the necessary passwords, enter them using the SetInputPasswords method, which will allow Toolkit to process the PDF.