I am unable to get the samples to run for Python on Windows 2012 R2, using the 64BIT Python 2.7.15 and 64BIT Python bindings for PDFNet.
I have placed the PDFNetC.dll file in the SysWow64 and System32 folders as per instructions, still I get this error:
Traceback (most recent call last):
File “AddImageTest.py”, line 9, in
from PDFNetPython import *
File “C:\PDFNetWrappersWin64\PDFNetWrappersWin64\PDFNetC\Lib\PDFNetPython.py”, line 26, in
_PDFNetPython = swig_import_helper()
File “C:\PDFNetWrappersWin64\PDFNetWrappersWin64\PDFNetC\Lib\PDFNetPython.py”, line 22, in swig_import_helper
_mod = imp.load_module(’_PDFNetPython’, fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.
Press any key to continue . . .
Any help would be appreciated. I had previously got this working on Windows 10 following the same procedure.
If you have not already, please carefully review how our Python samples are coded, and where the PDFNetC.dll is located at runtime.
That should give you an idea of how to proceed and resolve your issue.
The problem turns out to have been that the Windows 2012 server was missing the Visual C++ Redistributable for Visual Studio 2015.
Not sure if this is mentioned anywhere in the documentation, but I think it should be, as the error makes it appear as though the DLL file is in the wrong place, when it is really missing a dependant DLL file.
I am glad you got it working on your end.
For others looking at this post, I want to clarify:
- Our Python bindings for PDFNet do not have any external run-time dependencies on Windows.
- PDFTron SDK for .NET requires corresponding VC++ runtime libraries:
a) PDFTron SDK for .Net 4.0 will need the Microsoft Visual C++ 2010 redistributable
b) PDFTron SDK for .Net 2.0 will need the Microsoft Visual C++ 2008 redistributable
Please refer to the following guide: