Re: Could I see concrete steps for building the PHP wrappers on Linux?

196 views
Skip to first unread message

Aaron

unread,
Aug 6, 2014, 5:44:53 PM8/6/14
to pdfne...@googlegroups.com
Similarly, here is how you would build Python wrappers against the 32-bit PDFNet:

mkdir wrappers_build # Make a directory to build the wrappers in.
cd wrappers_build # Move to that directory.
git clone https://github.com/PDFTron/PDFNetWrappers # Git the code.
cd PDFNetWrappers/PDFNetC # Move to where we download PDFNet.
wget http://www.pdftron.com/downloads/PDFNetC.tar.gz # Download PDFNet.
tar xzvf PDFNetC.tar.gz # Unpack PDFNet.
mv PDFNetC/Headers/ . # Move PDFNet Headers/ into place.
mv PDFNetC/Lib/ . # Move PDFNet Lib/ into place.
cd .. # Go back up.
mkdir Build # Create a directory to create the Makefiles in.
cd Build # Move to that directory.
cmake -D BUILD_PDFNetPython=ON .. # Create the Makefiles with CMake.
make # Build the Python wrappers with SWIG.
make install # Copy the Python wrappers to where the samples can find them.
cd ../Samples # Move to the Samples directory.
./runall_python.sh # Run all Python code samples, using the new wrappers.

[Note that 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.]

Aaron

unread,
Aug 5, 2014, 9:56:20 PM8/5/14
to pdfne...@googlegroups.com
Q:

I'm having trouble following the steps in the README.md (https://github.com/PDFTron/PDFNetWrappers/blob/master/README.md) regarding how to build the PHP wrappers (https://github.com/PDFTron/PDFNetWrappers) on Linux.  Could you give concrete example commands of what exactly to run?

------
A:

Suppose you wanted to build and run the 64-bit PHP wrappers on Linux.  You could run the following set of commands:

mkdir wrappers_build # Make a directory to build the wrappers in.
cd wrappers_build # Move to that directory.
git clone https://github.com/PDFTron/PDFNetWrappers # Git the code.
cd PDFNetWrappers/PDFNetC # Move to where we download PDFNet.
wget http://www.pdftron.com/downloads/PDFNetC64.tar.gz # Download PDFNet.
tar xzvf PDFNetC64.tar.gz # Unpack PDFNet.
mv PDFNetC64/Headers/ . # Move PDFNet Headers/ into place.
mv PDFNetC64/Lib/ . # Move PDFNet Lib/ into place.

cd .. # Go back up.
mkdir Build # Create a directory to create the Makefiles in.
cd Build # Move to that directory.
cmake -D BUILD_PDFNetPHP=ON .. # Create the Makefiles with CMake.
make # Build the PHP wrappers.
make install # Copy the PHP wrappers to where the samples can find them.

cd ../Samples # Move to the Samples directory.
./runall_php.sh # Run all PHP code samples, using the new wrappers.


Reply all
Reply to author
Forward
0 new messages