Problem with PDF Creator...workaround given in the readme.txt is not the challenge apparently

By Damon - February 10, 2014

Hi,

Greg put together this list in another post:

Here are the all the libraries that Create PDF could possibly use:

libXext

fontconfig

fontconfig

zlib

openssl-devel.i386

xorg-x11-fonts-Type1

msttcorefonts

liberation-fonts

liberation-fonts-common

liberation-sans-fonts

liberation-mono-fonts

liberation-serif-fonts

The libraries are needed so that wkhtmltopdf (http://code.google.com/p/wkhtmltopdf/) a shell utility used by the createPDF plugin can convert fonts correctly on webpages. 

Can you send this list to your host and let us know what they reply with?

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Codee - February 10, 2014

Thanks, Damon. Just sent it to the hosting company. I'll reply back with what they state.

By Damon - February 10, 2014

Great thanks!  Hopefully the details they provide will help us track down the issue.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Codee - February 12, 2014

Hi Damon, I gave them your whole list, per your reply:

"Here are the all the libraries that Create PDF could possibly use:
libXext

fontconfig

fontconfig

zlib

openssl-devel.i386

xorg-x11-fonts-Type1

msttcorefonts

liberation-fonts

liberation-fonts-common

liberation-sans-fonts

liberation-mono-fonts

liberation-serif-fonts

The libraries are needed so that wkhtmltopdf (http://code.google.com/p/wkhtmltopdf/) a shell utility used by the createPDF plugin can convert fonts correctly on webpages.
"

and they responded with:

"The components all look to be installed. Can you please provide instructions on how we can replicate the issue and we can review it from our end."

So, I set up a test account for them and put in a test golf lesson and gave them login instructions so they can login, see the lesson, click "view as PDF" and then get the error.  We'll see what they ask/do next.

By Damon - February 12, 2014

Ok thanks. Let me know what the host replies with.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Codee - February 13, 2014

Hi Damon,

Interesting reply, see below. Apparently it didn't work until the host logged in as root.  So he's connecting with the PHP vendors that supply the host company and will let me know what's to be done, or needs to be done.

------------

"I am checking this at present, seem to be a bit tricky ... I will update you shortly.

It worked when I tried to run the command as root."
----------
and then,

-----------

"Posted 12 Feb 2014 09:34 AM Hello,

It looks like the issue is with the chrooted environment. I am going to check this with the PHP vendors and seems they need to amend the code to get this working...

Best regards,"

----------------------

By Dave - February 13, 2014

Hi Terry,

If you hosting account is in a chroot/jailed environment (a common setup) then your server admin might be able to get it work by just copying the files from the root environment to the chroot environment.

So say the "real" path to your website is: /var/www/vhosts/yourwebsite.com/httpdocs/

And when you're chroot'd it thinks the root is /var/www/vhosts/yourwebsite.com/ (eg: PHP see's that path as /) 

They could try just copying any font related files from the real location (say /etc/fonts/) to your chroot location: /var/www/vhosts/yourwebsite.com/etc/fonts/

There's a list of fontconfig related files here under "files": http://pkgs.org/centos-6/centos-i386/fontconfig-2.8.0-3.el6.i686.rpm.html

Additionally, if any *.so files can't be loaded or are missing they can be copied into /cmsAdmin/plugins/createPDF/shared_libs/ and the plugin sets this environment variable so they will be loaded from there (it's a way for us to get it working on shared hosts): export LD_LIBRARY_PATH='$pluginDir/shared_libs';

So in short, you could suggest that your host just copy any required files from the real filesystem to your chroot'd filesystem, and if that isn't enough then to copy any needed .so files to the /shared_libs/ folder.  Or if you can SSH in as root to your chroot environment and yum install from there that would work too.

Note that these are all server admin issues and well outside of what we do, so we might not be able to help much, but I wanted to offer up the above suggestions.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

By Codee - February 18, 2014

Hi Dave,

Here's what the hosting company wrote:

"Unfortunately, we won't be able to provide to provide a solution in the new server as it would require an installation of different libraries in the server. We can't simply install everything that customers requires, we try to keep an standard configuration.

As an alternative, you can use the following API tool: http://pdfcrowd.com/web-html-to-pdf-php/ The free account lets you create up to 100 pdfs per month.

Otherwise, what we can offer you is a Cloud/Dedicated Server in which we can configure the server to all your customers needs.

Let us know how would you like to proceed."

So, I don't want to go the path of a dedicated server.  Am I reading your post correctly, in that I can copy the files into a directory at /cmsAdmin/plugins/createPDF/shared_libs/ and this would work instead?

By Dave - February 18, 2014

Hi Terry,

Yea, we might be able to.  Do you have SSH access to the server?  If you email me at dave@interactivetools.com with FTP/CMS login details I can take a look.  Note: Email, don't post passwords to the forum.

Thanks!

Dave Edis - Senior Developer
interactivetools.com