PDFNET Python SDK in Mac OSX Yosemite

Hi,

I have been trying to the Python SDK on Mac OSX (Default mac python uses UCS4).

When I run the samples, I get the following error -

AnnotationTest running

PDFNet is running in demo mode.
Traversing all annotations in the document…
Page 1:
Annot Type: Text
Position: 266.0, 116.0, 430.0, 204.0
Annot Type: Link
Position: 85.0, 661.0, 503.0, 705.0
Links to: page number 2 in this document.
Annot Type: Link
Position: 85.0, 594.0, 503.0, 638.0
Links to: page number 10 in this document.
Annot Type: Link
Position: 85.0, 524.0, 503.0, 570.0
Links to http://www.pdftron.com
Page 2:
Page 3:
Page 4:
Page 5:
Page 6:
Page 7:
Page 8:
Page 9:
Page 10:
Page 11:
Page 12:
Page 13:
Page 14:
Page 15:
Page 16:
Page 17:
Page 18:
Page 19:
Page 20:
Page 21:
Page 22:
Page 23:
Page 24:
Page 25:
Page 26:
Page 27:
Traceback (most recent call last):
File “AnnotationTest.py”, line 581, in
CreateTestAnnots(doc1)
File “AnnotationTest.py”, line 203, in CreateTestAnnots
txtannot.SetBorderStyle( BorderStyle( BorderStyle.e_solid, 1, 10, 20 ), True )
File “/Users/phalgun/coding/wrappers_build/PDFNetWrappers/PDFNetC/Lib/PDFNetPython.py”, line 2650, in SetBorderStyle
def SetBorderStyle(self, *args): return _PDFNetPython.Annot_SetBorderStyle(self, *args)
NotImplementedError: Wrong number or type of arguments for overloaded function ‘Annot_SetBorderStyle’.
Possible C/C++ prototypes are:
pdftron::PDF::Annot::SetBorderStyle(pdftron::PDF::Annot::BorderStyle const &,bool)
pdftron::PDF::Annot::SetBorderStyle(pdftron::PDF::Annot::BorderStyle const &)

AnnotationTest finished. Press enter to continue…

The libraries are placed in /usr/local/lib.

Is there somewhere I am going wrong? If I don’t set the BorderStyle, the script runs fine without a problem. The same script runs fine on a Linux server.

  • Phalgun

Fixed it by re-downloading the Python binaries and moving the dylib files to /usr/local/lib.