PDFNet python binding does not working with UCS4 Python

When I try to run the samples using Python 2.7 (default Python on Ubuntu 14.04, ucs4), I get the following error -

AddImageTest running
Traceback (most recent call last):
File “AddImageTest.py”, line 9, in
from PDFNetPython import *
File “/home/ubuntu/pdftron/PDFNetWrappersLinux64/PDFNetC/Lib/PDFNetPython.py”, line 28, in
_PDFNetPython = swig_import_helper()
File “/home/ubuntu/pdftron/PDFNetWrappersLinux64/PDFNetC/Lib/PDFNetPython.py”, line 24, in swig_import_helper
_mod = imp.load_module(’_PDFNetPython’, fp, pathname, description)
ImportError: /home/ubuntu/pdftron/PDFNetWrappersLinux64/PDFNetC/Lib/_PDFNetPython.so: undefined symbol: PyUnicodeUCS2_AsUTF8String

We have purchased a license and it is imperative that we use Python with UCS4 only (as UCS2 does not work with the encoding we use). I read in a previous thread [1] that a build that supports Python compiled with UCS4 will be provided.

Could you please share a build that runs with default Python (UCS4)?

[1] - https://groups.google.com/forum/?fromgroups#!searchin/pdfnet-sdk/UCS4/pdfnet-sdk/9wDzBQkxQDs/gyvmigQ0R_MJ

Thanks
Phalgun

Hi, to get UCS4 compatible Python wrapper, you can follow the instructions here.

https://github.com/PDFTron/PDFNetWrappers

Building UCS2 wrappers and UCS4 wrappers are identical processes, as long as CMake is able to find the correct header and configuration of that Python variant.