|  | 
  Niek Reus - 2012-07-12 10:33:09 - In reply to message 20 from PHP-4-BusinessHi Geoff,
 In the end I found on the internet somebody who faced the same problem as I did and who got the advice to add a certain command. I forgot what it was, but I followed this advice and then I was able to install wkhtmltopdf and it works very well.
 
 Thank you so much for your time and patience. I'm glad to tell you that in the end they were not in vain.
 
 Yours,
 Niek
  PHP-4-Business - 2012-07-13 06:53:39 - In reply to message 21 from Niek ReusHi Niek,
 I'm glad you managed to compile the php extension ok.
 
 I prefer using the extension to using the binary program although of course there are no problems with having to compile the binary, so many people simply choose that option as it is much easier to install.
 
 Best regards,
 Geoff
  Alex Sandescu - 2013-01-18 20:43:00 - In reply to message 21 from Niek ReusDear Niek,
 I have the same problem, would have been nice to have the solution here, while you found it...
 
 
  Alex Sandescu - 2013-01-18 21:13:23 - In reply to message 23 from Alex SandescuSolution:
 echo "/usr/local/lib" >> /etc/ld.so.conf
 /sbin/ldconfig
 
 Hope this helps.
 
 Cheers!
 
 Alex
  Rohit Singhal - 2014-01-10 12:00:18 - In reply to message 1 from PHP-4-BusinessI am trying to convert html to pdf using wkhtmltopdf but I am getting some funny output. When I am using through command prompt, the fonts are coming correctly but I am trying to execute that command in php using system, shell_exec and exec, its not taking correct font. What can be the issue?? One more thing I want to do is that I want to cut the pdf from the top of 20px something then make the pdf. Please help me if its possible to get by using wkhtmltopdf. I have tried many other converters which converts html to pdf but only wkhtmltopdf is giving the correct output. So please help me in only wkhtmltopdf. I can give you the link so that you can first try yourself first before reply.
 My php script is the following, tell me if you can modify here itself.
 
 $url = "http://raindrops.in/ainvvy/view/527a727a4251df44558b4567";
 
 $blah = shell_exec("xvfb-run -a -s '-screen 0 1024x768x30' wkhtmltopdf -B 0 -L 0 -R 0 -T 0  --page-height 1147.8px --page-width 1800px --dpi 300 --encoding utf-8 ".$url." /tmp/test.pdf");
 $a = file_get_contents("/tmp/test.pdf");
 unlink("/tmp/test.pdf");
 header('Content-Type: application/pdf');
 header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
 header('Pragma: public');
 header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
 header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
 header('Content-Length: '.strlen($a));
 header('Content-Disposition: inline; filename="/tmp/test.pdf";');
 echo $a;
 die($a);
 ?>
  PHP-4-Business - 2014-01-10 12:54:43 - In reply to message 25 from Rohit Singhal
  Niek Reus - 2015-08-24 16:39:10 - In reply to message 22 from PHP-4-BusinessHi Geoff,
 It's me again. Today I downloaded your instructions again to install wkhtmltopdf on another Linux server. Unfortunately I got stuck on
 
 5) Compile and install the extension
 
 It says:
 
 cd  /tmp/mreiferson-php-wkhtmltox-fa6208e
 
 That directory doesn't exist. But there is a directory /tmp/mreiferson-php-wkhtmltox-6d3ab88. So I changed the name. When I execute the command:
 
 phpize
 
 I get the following:
 
 Configuring for:
 PHP Api Version:         20090626
 Zend Module Api No:      20090626
 Zend Extension Api No:   220090626
 /usr/bin/phpize: /tmp/mreiferson-php-wkhtmltox-6d3ab88/build/shtool: /bin/sh: bad interpreter: Permission denied
 Cannot find autoconf. Please check your autoconf installation and the
 $PHP_AUTOCONF environment variable. Then, rerun this script.
 
 So obviously something goes wrong. I tried the next command:
 
 ./configure  --with-phpwkhtmltox=/tmp/wkhtmltopdf-0.11.0_rc1
 
 That gives as result:
 
 -bash: line 71: ./configure: No such file or directory
 
 I hope you can help me to get on the right track.
 
 Best regards,
 Niek
  PHP-4-Business - 2015-08-24 17:23:33 - In reply to message 27 from Niek ReusHi Niek, 
It could be that your /tmp directory is not executable (i.e. is mounted with a noexec flag). Try:
 
  mount  -o  remount,exec,suid  /tmp
 
and then go again from 'phpize'
 
Alternatively (but less likely) you may not have the symlink for /bin/sh set up
 serverfault.com/questions/433178/ca ...
 
Rgds, 
Geoff
  Niek Reus - 2015-08-24 18:30:03 - In reply to message 28 from PHP-4-BusinessHi Geoff,
 The /tmp directory is executable. The symlink /bin/sh links to /bin/bash. Is that correct?
 
 Best regard,
 Niek
  PHP-4-Business - 2015-08-24 18:47:30 - In reply to message 29 from Niek Reus |