Running PDFNet for Python on Linux


I am running the example WebViewerConvert in python 2.7 on a 64-bit architecture ( Debian GNU/Linux 6.0 x86_64
) raises this error:

Traceback (most recent call last):
File “”, line 11, in
from PDFNetPython2 import *
File “/opt/PDFNetC64/Lib/”, line 26, in
_PDFNetPython2 = swig_import_helper()
File “/opt/PDFNetC64/Lib/”, line 22, in swig_import_helper
_mod = imp.load_module(’_PDFNetPython2’, fp, pathname, description)
ImportError: /opt/PDFNetC64/Lib/ undefined symbol: PyCapsule_GetPointer

I have checked more than once that I’m using the binaries distributed PDFNetC64.tar.gz in What may be happening?


Python2 wrapper comes with to use PDFNetC with Python interpreters that are built with 4-byte Unicode. To use this wrapper, rename to and replace the original file.

To check the width of Unicode used on your system:

When built with --enable-unicode=ucs4:

>>> import sys
>>> print sys.maxunicode

When built with --enable-unicode=ucs2:

>>> import sys
>>> print sys.maxunicode

FYI: The Python version is the problem, the production server is running with 2.6.6 I tested locally with Python 2.7.3 and it works perfect.