Q: Almost working…
I tested using python running under cgi-bin (i.e. triggered from a web browser), now I want to make it into a command line script using the exact same code, same files, same location, same parameters I am getting this error:
File “/home/ubuntu/personalize/Lib/PDFNetPython2.py”, line 5255, in Save
def Save(self, *args): return _PDFNetPython2.PDFDoc_Save(self, *args)
Exception: An error occurred while trying to save the file.
The file might be locked, corrupt, or unavailable.
locale::facet::_S_create_c_locale name not valid
any idea what this might be and how comes it runs well as a cgi script?
fixed - please ignore.
FYI - this was the cure:
On Tuesday, August 7, 2012 4:25:21 PM UTC-7, Support wrote:
Q: I want to add a feature to our server that automates adding some PDFs together and adding some personalization of the
PDF books. So I thought of using PDFNet on the server for this.
I wrote a prototype that runs fine on my Mac OSX using Python, but on the server which is a Ubuntu 32-bit version, I get this error:
/var/www/cgi-bin/Lib/_PDFNetPython2.so: undefined symbol: PyUnicodeUCS2_AsUTF8String
It seems that the library is built for UCS2 and the server python version
(2.7.2) is expecting 4 byte unicode (See
any advice? or do you have a version that can run on UCS4 python?
We have recently added support for UCS4 Python. You can download the onofficial build using the following links:
Please see libinfo.txt for how to use _PDFNetPython2_ucs4.so.