Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF Export Errors in OS X #314

Closed
neonbasschild opened this issue Oct 13, 2015 · 5 comments
Closed

PDF Export Errors in OS X #314

neonbasschild opened this issue Oct 13, 2015 · 5 comments
Labels

Comments

@neonbasschild
Copy link

Ok so I had to a bit of debug to even get pdftk to respond. I placed an alias of pdftk into the tools folder like I normally would and got no permission error. So I place pdftk into the tools folder and started getting errors like shown below. After that I tried to duel approach like what is done with linux. So I changed

elif sys.platform == 'darwin':
return os.path.join(MY_CWD, 'tools', 'pdftk')

to

elif sys.platform == 'darwin':
sys_path = '/usr/bin/pdftk'
loc_path = os.path.join(MY_CWD, 'tools', 'pdftk')
if os.path.exists(sys_path):
return sys_path
else:
return loc_path

I understand that the loc_path is redundant at this point I just wanted to cover all my bases.

But this is the final error that I got with both /tools/pdftk and /user/bin/pdftk

dyld: Library not loaded: @executable_path/../lib/libgcj.11.dylib
Referenced from: /usr/bin/pdftk
Reason: image not found
deleted temp file: /var/folders/b5/bt9x5k9n4b13fsvz52rhcjc00000gq/T/tmp3XJm55.fdf
created pdf /var/folders/b5/bt9x5k9n4b13fsvz52rhcjc00000gq/T/tmpjeZyCZ.pdf
dyld: Library not loaded: @executable_path/../lib/libgcj.11.dylib
Referenced from: /usr/bin/pdftk
Reason: image not found
deleted temp file: /var/folders/b5/bt9x5k9n4b13fsvz52rhcjc00000gq/T/tmp73qBOW.fdf
created pdf /var/folders/b5/bt9x5k9n4b13fsvz52rhcjc00000gq/T/tmpEbDj9T.pdf
dyld: Library not loaded: @executable_path/../lib/libgcj.11.dylib
Referenced from: /usr/bin/pdftk
Reason: image not found
deleted temp file: /var/folders/b5/bt9x5k9n4b13fsvz52rhcjc00000gq/T/tmplSxe6h.pdf
deleted temp file: /var/folders/b5/bt9x5k9n4b13fsvz52rhcjc00000gq/T/tmpjeZyCZ.pdf
deleted temp file: /var/folders/b5/bt9x5k9n4b13fsvz52rhcjc00000gq/T/tmpEbDj9T.pdf

The only thing that I can think of is that there is some kinda of problem with the pdftk distro at https://www.pdflabs.com/tools/pdftk-server/ or a mismatch between os. I am trying to find some pdftk ports to mac os now. But I could always be barking up the wrong tree.

@neonbasschild
Copy link
Author

I do remember someone having this error before because they were missing the gcc libraries. I am updating my macports now so that I can try and installing a new version of gcc and see if that fixes anything.

I possibly lost the file because of a OS upgrade.

@OpenNingia
Copy link
Owner

@neonbasschild According to this,

http://stackoverflow.com/questions/2975008/dyld-library-not-loaded-error-mac-os

it could be a path problem.

That executable is looking for libgcj.11.dylib in /usr/lib/

@neonbasschild
Copy link
Author

Yeah libgcj.11.dylib is part of gcc4.7 and is a dependency of pdftk that is not included in the package I am trying to find a workable gcc package but all of them that I find fail to compile because of problems with the code and the newer versions of OS X. Still trying to find a work around.

@OpenNingia
Copy link
Owner

did you try building pdftk with this? https://github.com/docmunch/homebrew-pdftk

also I'm looking into a pure python alternative ( PyPDF2 ) but there are blocking issues.
If they could at least fix py-pdf/pypdf#232 I could start integrating it.

@OpenNingia
Copy link
Owner

can't support macosx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants