Closed sourav-prescriber-360 closed 5 years ago
you need to have podofo compiled on your system, if the path to podofo is not a common installation path (eg. /usr, /usr/local) you will need to provide the path to podofo as an -rpath argument. What OS are you using? Installation instructions are also provided in the book
@corymickelson I am using MACOs for dev purpose later will deploy to LINUX server
@sourav-prescriber-360 I've not tested on Mac, I do have one available though, I can take a look and get back to you.
@corymickelson I tried installing on MacOS with the code given in the GitBook:
git clone https://github.com/svn2github/podofo $HOME/podofo && \ cd $HOME/podofo && \ mkdir $HOME/podofo/build && \ cd $HOME/podofo/build && \ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local && \ make && make install
Error
[ 55%] Linking CXX executable ContentParser Undefined symbols for architecture x86_64: "_FcConfigDestroy", referenced from: PoDoFo::PdfFontConfigWrapper::DerefBuffer() in libpodofo.a(PdfFontConfigWrapper.cpp.o) "_FcConfigSubstitute", referenced from: PoDoFo::PdfFontCache::GetFontConfigFontPath(_FcConfig*, char const*, bool, bool) in libpodofo.a(PdfFontCache.cpp.o) "_FcDefaultSubstitute", referenced from: PoDoFo::PdfFontCache::GetFontConfigFontPath(_FcConfig*, char const*, bool, bool) in libpodofo.a(PdfFontCache.cpp.o) "_FcFontMatch", referenced from: PoDoFo::PdfFontCache::GetFontConfigFontPath(_FcConfig*, char const*, bool, bool) in libpodofo.a(PdfFontCache.cpp.o) "_FcInitLoadConfigAndFonts", referenced from: PoDoFo::PdfFontConfigWrapper::InitializeFontConfig() in libpodofo.a(PdfFontConfigWrapper.cpp.o) "_FcPatternBuild", referenced from: PoDoFo::PdfFontCache::GetFontConfigFontPath(_FcConfig*, char const*, bool, bool) in libpodofo.a(PdfFontCache.cpp.o) "_FcPatternDestroy", referenced from: PoDoFo::PdfFontCache::GetFontConfigFontPath(_FcConfig*, char const*, bool, bool) in libpodofo.a(PdfFontCache.cpp.o) "_FcPatternGet", referenced from: PoDoFo::PdfFontCache::GetFontConfigFontPath(_FcConfig*, char const*, bool, bool) in libpodofo.a(PdfFontCache.cpp.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [test/ContentParser/ContentParser] Error 1 make[1]: *** [test/ContentParser/CMakeFiles/ContentParser.dir/all] Error 2 make: *** [all] Error 2
You can install using vcpkg, if you have a package manager that you would rather use the only requirement at the moment is that podofo is 0.9.6 or greater and is built with openssl, libpng, libjpeg, libtiff, and if you need aes 256 encryption you will also need libidnv1. I know the vcpkg installation includes all but libidn. Im sorry I can't be of more assistance at the moment, but I will take a look into installation on mac soon, and will update the installation page with a mac section.
@sourav-prescriber-360 If you want to try the library in the mean time, you can pull the docker image nopodofo/alpine, this has podofo and nopodofo installed at /usr/local. If you were testing just in a node repl you would require nopodofo with require('nopodofo')
@sourav-prescriber-360 The macports podofo port is probably your easiest option for building podofo locally. This does however install to /opt/local which is not in the search path for nopodofo. I will update the cmake file today to include this directory when building nopodofo.
@corymickelson I have installed podofo using macports. Once you have updated the documentation I will proceed further for my project. Thanks for quick response
closing thread, the cmakelists file has been updated to include /opt in it's search path. Additional documentation has also been added to the mac os installation section.
I ran npm i nopodofo --save to my project My code below:-
I get the following error: