Ubuntu 14.04 Upgrade Problem - All requests for HTML2PDF don't execute, just redirects to HTML2PDF

I have had PDFNetC64 working for the last 3 years.

However we just upgraded the server to Ubuntu 14.04 and PHP5.5 which subsequently broke the Print to PDF buttons on the website.

Instead of executing the code to create the PDF it just goes to the page and sits on the link:


There are permissive permissions on this entire folder just to jump start it but that didn’t even work. Specifically execute permission on 'html2pdf.so was also granted.

I’m thinking it may be an owner/group thing. Both are set to www-data for all files in the PDFNetC64 directory, but at this point I have absolutely no idea.

XServer and the required fonts were also installed using:

/home/fhadmin# apt-get install xserver-xorg-core xserver-xorg xfonts-100dpi xfonts-75dpi xfonts-scalable ttf-mscorefonts-installer

Any help to get this working is appreciated.

It sounds like you may have a modified version of the HTML2PDFTest.php sample:


If you try the original sample out, does it convert pages in your environment?

If you’d like to try with the latest PDFNet, you can download PHP wrappers for the latest version of the PDFNet SDK at the following:



Alternately, if you need to compile the PHP wrappers yourself, you can find how to do so at:


Hello & thanks for responding.

Yes, it is slightly modified but it was a fully functioning file until the Ubuntu upgrade.

Your link does not contain the PDFNetPHP.php file which is an include for HTML2PDFTest, so I won’t be able to do a new install test. Where do I get that?

Also I believe this is probably a chown or chgrp issue. Right now it is set to www-data for both for all these files.

My apologies, you will need to compile the PHP wrappers yourself. You can find step-by-step build instructions for 64-bit Linux PHP wrappers in the readme.txt at:


(Please note that we can only provide advice regarding PDFNet functionality, not Ubuntu or PHP in general. If you believe that your Ubuntu upgrade changed permissions, you might be better off seeking help at an Ubuntu forum, such as http://ubuntuforums.org/ or http://askubuntu.com/.)

Thanks Aaron.

I just went back through some old help desk tickets and it appears that they had to copy some of the .so files to the usr folder and add pdfnet.ini to the conf.d.

cp /htdocs/PDFNetC64/Lib/PDFNetPHP.so /usr/lib/php5/20090626/
cp /htdocs/PDFNetC64/Lib/libPDFNetC.so /usr/lib/php5/20090626/
echo "extension=PDFNetPHP.so" > /etc/php5/conf.d/pdfnet.ini
/etc/init.d/php-fpm restart

Do you have any instructions on installing PDFNet on Linux? It seems that this is critical info that may be missing from your install docs, but again I’m not too sure. Thanks again for providing the php wrapper.

ALSO: Ubuntu 14.04 uses PHP 5.5. Is PDFTron compatible with PHP 5.5? This may be the issue.

Is PDFTron compatible with PHP 5.5?

The readme.txt at https://github.com/PDFTron/PDFNetWrappers provides this information:

Common Questions:
* Which versions of the interpreters are supported by this project?

Technically, any versions can be supported provided that some minor changes to the SWIG interface file must be made.
Within PDFTron, we have successfully built language bindings for the following versions of the interpreter:
    - PHP 5.3.x to 5.5.x
    - Python 2.7.x to 3.3.x
    - Ruby 1.8.5 to 2.0.0

Do you have any instructions on installing PDFNet on Linux?

After building the wrappers, you can use the Samples/runall_php.sh script to run the samples. As you can see from examining the scripts, the library is loaded by setting LD_LIBRARY_PATH prior to running the PHP script.

If you’d like more information about configuring PHP, you can find it at PHP-specific forums: