Giter Club home page Giter Club logo

php-wkhtmltox's Introduction

PHP bindings for the fabulous libwkhtmltox

Special thanks to antialize for creating wkhtmltopdf

For parameters and settings (for users familiar with the command line utility) see:

http://wkhtmltopdf.org/libwkhtmltox/pagesettings.html

Installation

$ phpize
$ ./configure
$ make install

edit your php.ini and add:

extension=phpwkhtmltox.so

Tested on:

  • CentOS 5.5, PHP 5.3.3 (64-bit)
  • Mac OSX 10.6.4 Snow Leopard, PHP 5.2.12 (64-bit)

Pre-requisites on all platforms:

  • you need libwkhtmltox.* somewhere in your LD path (/usr/local/lib)
  • you need the directory src/include/wkhtmltox from wkhtmltopdf somewhere on your include path (/usr/local/include)

OSX Notes:

Until this bug is fixed you need qt_menu.nib directory from the QT source tree in the same directory as your libwkhtmltox.* library files

php-wkhtmltox's People

Contributors

ashkulz avatar mikemackintosh avatar mj avatar mreiferson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-wkhtmltox's Issues

Official documentation

I'm thinking an official documentation wouldn't hurt. I'm trying to POST some values and also a cookie but with no success. Maybe the Wiki shouldn't be empty. Just my 2c. Thanks for the great job!

Crop setting not working

wkhtmltox_convert('image', array('out' => 'test.jpg', 'crop-h' => 500, 'in' => 'someurl'));

It works fine with setting such as quality => 50. But when I try to set cropping, the setting is just ignored. Tried several ways: crop-height, crop.height, height. Even a 2D array, but it gave me an error. How should it be set correctly?

Thank you in advance.

Output

In the libwkhtmltox docs it says:

out The path of the output file, if "-" output is sent to stdout, if empty the output is stored in a buffer.

I tried to set out to '-' which would seem to indicate that it should got to stdout. But the function only returns a boolean.

Is it possible to have the output be returned from your function?

Thanks,

Justin

500 error

Hello!

I'm trying to see if wxhtmltox could replace html2pdf lib in Simple Invoices application.

phpinfo shows that extension is enabled (0.10.0_beta5 ), but loading test_pdf.php script gives 500 error (Cherokee server).

Any hint how to troubleshoot it?

Multiple run test

Dear MReiferson!

When i run your script in a for statement, i got wrong pdfs. (Except the first, what is okey)
for ($i = 0; $i < 5; $i++){
wkhtmltox_convert('pdf',
array('out' => dirname(FILE).'/test_'.$i.'.pdf', 'imageQuality' => '95'), // global settings
array(
array('page' => 'http://www.visionaryrenesis.com/'),
array('page' => 'http://www.google.com/')
)
); // object settings
}

RESULT:
test_0.pdf 07-Oct-2010 12:34 45K
test_1.pdf 07-Oct-2010 12:34 25K
test_2.pdf 07-Oct-2010 12:34 25K
test_3.pdf 07-Oct-2010 12:34 25K
test_4.pdf 07-Oct-2010 12:34 25K

http://martondesign.com/temp/wkhtmltopdf/test_0.pdf (good)
http://martondesign.com/temp/wkhtmltopdf/test_1.pdf (wrong)

It processes the HTML, but not CSS, and images.

Can't load extension

Hi there,
i'm not very experimented on unix, but I tried to install this php bindings, and it don't work.
I first installed wkhtmltopdf (static) and it works fine on command line.
Then I downloaded libwkhtmltox (static), and copied lib/libwkhtmltox.so to /usr/local/lib.
I copied also the include/wkhtmltox directory into /usr/local/include
Then, I dowloaded this binding, and ran phpize, configure and make install, without error.
I added "extension=phpwkhtmltox.so" in my php.ini and restarted apache2.
I get this error :
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/phpwkhtmltox.so' - libwkhtmltox.so.0: cannot open shared object file: No such file or directory in Unknown on line 0

I checked /usr/lib/php5/20060613+lfs/, and phpwkhtmltox.so is there. So I suppose it's a dependency problem. What did I missed ?

Thanks

Headers and footers not working

Thanks for the excellent extension. I'm having a problem getting headers and footers to work. AFAIK I have a patched QT lib (libwkhtmltox-0.11.0_rc1-i386.tar.bz2 downloaded from the main site) and things like "imageQuality" work which seems to confirm this.

However none of the header or footer settings seem to do anything.

E.g.
wkhtmltox_convert('pdf',
array('out' => '/tmp/test1.pdf', "margin.top" => 20, 'header.center' => 'Page Header' ),
array(array('page' => 'http://www.visionaryrenesis.com/')));

does not display the header text. But using the static patched binary does work:
wkhtmltopdf --margin-top 20 --header-center 'Page Header' 'http://www.visionaryrenesis.com/' '/tmp/test2.pdf'

Thanks for any help you can give me.

Sessions

It does not appear that php-wkhtmltox keeps sessions in mind.

I have a page that I am pdf'ing and it is behind a login section. Every time I use your function it pdf's the login page.

wkhtmltox / wkhtmltopdf question

Is wkhtmltox/wkhtmltopdf creating some cache files, temporary files in the process of the PDF generation ? If yes, is there a way/option to set that path ?

This is not an issue, just a question, but I didn't found a better place to ask it.

Thanks a lot !

google.com shouldn't be used in the example function call of wkhtmltox_convert()

If you try and wkhtmltox_convert() the URL http://www.google.com, you'll get an error 500 (or at least I do, tested on multiple distros). I think this is because of the problem documented here: http://simpleinvoices.org/forum/discussion/972/fatal-error-call...-when-trying-to-export-pdf/p1, namely that google.com is not XML and therefore, from that page:

domdocument's loadxml is correctly choking on the sgml content

I can successfully call this function on many other URLs, so perhaps google.com shouldn't be the example URL in the documnetation.

configure: error: libwkhtmltox version 0.10 or later required

I'm using Mac OS10.6 and having trouble in configuring php-wkhtmltox
I've put the libwkhtmltopdf.* (dylib file) in /usr/local/lib

84584 -rwxr-xr-x@ 1 root wheel 43305948 1 Feb 07:04 libwkhtmltox.0.10.0.dylib
8 lrwxrwxrwx@ 1 1000 1000 25 1 Feb 19:35 libwkhtmltox.0.10.dylib -> libwkhtmltox.0.10.0.dylib
8 lrwxrwxrwx@ 1 1000 1000 25 1 Feb 19:35 libwkhtmltox.0.dylib -> libwkhtmltox.0.10.0.dylib
8 lrwxrwxrwx@ 1 1000 1000 25 1 Feb 19:35 libwkhtmltox.dylib -> libwkhtmltox.0.10.0.dylib
0 drwxr-xr-x 5 root wheel 170 13 Jul 10:56 qt_menu.nib

I have also copied qt_menu.nib from the QT source to /usr/local/lib
I've put the wkhtmltox to /usr/local/include

And here's the content of my bash_profile:

export PATH=$PATH:/opt/local/bin:usr/local/bin:/usr/lib/pear/bin:/usr/local/include
export PATH
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
export DYLD_LIBRARY_PATH=/usr/local/lib

Below is the output when i tried to configure php-wkhtmltox
sudo ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i386-apple-darwin10.7.4
checking host system type... i386-apple-darwin10.7.4
checking target system type... i386-apple-darwin10.7.4
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for libwkhtmltox support... yes, shared
found in /usr/local
checking for wkhtmltopdf_init in -lwkhtmltox... no
configure: error: libwkhtmltox version 0.10 or later required

I can do the command line wkhtmltopdf and wkhtmltoimage fine but I want to make this php binding to work so that I can call it on my php file instead of executing shell command through php

Do you have any resolution for this problem in Mac OS? Thanks

Cannot create TOC

First of all: thanks for this awesome project!

Generation of a PDF works fine, until I try to add a TOC. Same options on the cmd line cause no problems. Am I missing something here or is this not supported yet?

Thanks!

  wkhtmltox_convert('pdf',
    array(
      'out' => $filepath,
    ),
    array(
      array(
        'tocXsl' => 'http://somedomain.com/assets/toc.xsl',
      ),
      array(
        'page' => 'http://somedomain.com/',
        'includeInOutline' => 'true',
      ),
    ));

Stdout / write pdf to page

Is there a way to write a pdf directly to php's output stream? That way you could just change the header's content type and be able to have the user view the pdf directly without pointing them to a file on the server?

I tried specifying "-" for "out" but that didn't work. I'd rather not create a bunch of files in my tmp directory that have to be purged after a few hours.

page and out parameters : use string to define and retrieve generated PDF

Hi, first of all, congratulation on the great work!

First, i would like the out parameter when generating PDF:

"out The path of the output file, if "-" output is sent to stdout, if empty the output is stored in a buffer."

I would like the wkhtmltox_convert function to return a string with the generated PDF or to put it on a string that a i pass to wkhtmltox_convert, when i use the out parameter as '' or '-'

I also would like to use the page parameter to pass the HTML (page) as a string, as if i passed it via stdin.

"page The URL or path of the web page to convert, if "-" input is read from stdin."

Maybe send the header and footer HTML via php string would be very nice too!

Is it possible?

Thx a lot!

Problems installing it on Ubuntu

When I do ./configure I get this error:

checking for libwkhtmltox support... yes, shared
not found
configure: error: Please install libwkhtmltox

$PATH -> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/lib:/include

This is what I have in /lib (They are other files and folders):

lrwxrwxrwx 1 root root 22 Nov 25 20:44 libwkhtmltox.so -> libwkhtmltox.so.0.10.0*
lrwxrwxrwx 1 root root 22 Nov 25 20:44 libwkhtmltox.so.0 -> libwkhtmltox.so.0.10.0*
lrwxrwxrwx 1 root root 22 Nov 25 20:44 libwkhtmltox.so.0.10 -> libwkhtmltox.so.0.10.0*
-rwxr-xr-x 1 root root 300072 Nov 25 20:44 libwkhtmltox.so.0.10.0*

So what could be causing this problem?

Gtk-WARNING **: cannot open display

When you try to use the php extension to create a pdf (or image) of a site that uses flash, such as www.youtube.com you will receive an error message
Gtk-WARNING **: cannot open display:

Using the command line tool you can use xvfb-run to similate a graphical environment, but you can't do this workaround with the php extension.

Here is my modified test_pdf.php

'/tmp/test'.$i.'.pdf', 'imageQuality' => '95'), // global settings array( array('page' => 'http://www.youtube.com/') )); // object settings } ?>

And here is the output

matt@ubuntu-server:~/Downloads$ sudo php test_pdf.php

(:15111): Gtk-WARNING **: cannot open display:
matt@ubuntu-server:~/Downloads$

Error 500 on Lighttpd

When I run the test script on the command line it works like a charm, however when I try to use lighttpd it gives me a 500 internal server error. The log says:

2012-06-20 20:32:30: (mod_fastcgi.c.2543) unexpected end-of-file (perhaps the fastcgi process died): pid: 43573 socket: unix:/opt/local/var/lib/lighttpd/sockets/php-fastcgi-1.socket-0
2012-06-20 20:32:30: (mod_fastcgi.c.3329) response not received, request sent: 1110 on socket: unix:/opt/local/var/lib/lighttpd/sockets/php-fastcgi-1.socket-0 for /dougalgraham.ca/resume/resume/print_pdf.php?, closing connection

I'm on Mac OS X Lion, the directory I'm writing to is owned by the server's user and chmodded to 777 but it's just not working. Any ideas what might be happening?

size.pageSize is ignored

Hello,

I am on Ubuntu 10.04 and using wkhtmltox 0.10.0_rc2 . Everything works perfectly except that size.pageSize is ignored and default size of A4 is used instead. I am using the below code:

'tmp/test2.pdf', 'imageQuality' => '95', 'size.paperSize' => 'A9'), // global settings array( array('page' => 'http://www.google.com/') )); // object settings ?>

Please help.

Thanks,
Jatinder Thind

Problems with PHP FastCGI - memory leak?

Hello there, and thanks again for this great extension.

I started experiencing problems on my webserver shortly after installing phpwkhtmltox. My server is running ubuntu 10.04, Apache2, with PHP FastCGI. I had set PHP_FCGI_CHILDREN=10.

After a short while my php-cgi processes started using 70mb+ of ram each. Additionally, I started getting a lot of lines like this in my apache error log and my site basically shut down completely:
[Sat Mar 05 22:47:33 2011] [error] [client 67.184.53.79] FastCGI: comm with (dynamic) server "/var/local/fcgi/php-cgi-wrapper.fcgi" aborted: (first read) idle timeout (20 sec)
[Sat Mar 05 22:47:33 2011] [error] [client 67.184.53.79] FastCGI: incomplete headers (0 bytes) received from server "/var/local/fcgi/php-cgi-wrapper.fcgi"

As a result, I had to constantly restart the server to keep everything working. I tried decreasing PHP_FCGI_CHILDREN, messing around with Apache MaxClients, and even turned off some services on my server to try to fix the problem. The only thing I had done before the problem started was install the extension. I turned the extension off in my php.ini and everything went back to normal.

I don't really know what was ultimately causing the problem (and I do have the extension running successfully on another development machine), but I figured I should post in case others experience this type of behavior (and save them a couple of hours).

compiling for PHP 7

can not get it to compile with php 7

wget https://bitbucket.org/wkhtmltopdf/wkhtmltopdf/downloads/wkhtmltox-0.13.0-alpha-7b36694_linux-centos7-amd64.rpm
yum install -y wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
yum install -y wkhtmltox-0.13.0-alpha-7b36694_linux-centos7-amd64.rpm
git clone https://github.com/mreiferson/php-wkhtmltox.git
cd php-wkhtmltox/ && phpize && ./configure && make install
<...>
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
/bin/sh /tmp/php-wkhtmltox/libtool --mode=compile cc  -I. -I/tmp/php-wkhtmltox -DPHP_ATOM_INC -I/tmp/php-wkhtmltox/include -I/tmp/php-wkhtmltox/main -I/tmp/php-wkhtmltox -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/php-wkhtmltox/phpwkhtmltox.c -o phpwkhtmltox.lo 
libtool: compile:  cc -I. -I/tmp/php-wkhtmltox -DPHP_ATOM_INC -I/tmp/php-wkhtmltox/include -I/tmp/php-wkhtmltox/main -I/tmp/php-wkhtmltox -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-wkhtmltox/phpwkhtmltox.c  -fPIC -DPIC -o .libs/phpwkhtmltox.o
/tmp/php-wkhtmltox/phpwkhtmltox.c: In function 'zif_wkhtmltox_convert':
/tmp/php-wkhtmltox/phpwkhtmltox.c:137:17: warning: passing argument 2 of 'zend_hash_get_current_data_ex' from incompatible pointer type [enabled by default]                                       
                 zend_hash_get_current_data_ex(params_hash, (void **)&data, &pointer) == SUCCESS;                                                                                                  
                 ^                                                                                                                                                                                 
In file included from /usr/include/php/Zend/zend.h:36:0,                                                                                                                                           
                 from /usr/include/php/main/php.h:35,                                                                                                                                              
                 from /tmp/php-wkhtmltox/phpwkhtmltox.c:7:                                                                                                                                         
/usr/include/php/Zend/zend_hash.h:171:30: note: expected 'HashPosition *' but argument is of type 'void **'                                                                                        
 ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);                                                                                                     
                              ^                                                                                                                                                                    
/tmp/php-wkhtmltox/phpwkhtmltox.c:137:17: error: too many arguments to function 'zend_hash_get_current_data_ex'                                                                                    
                 zend_hash_get_current_data_ex(params_hash, (void **)&data, &pointer) == SUCCESS;                                                                                                  
                 ^                                                                                                                                                                                 
In file included from /usr/include/php/Zend/zend.h:36:0,                                                                                                                                           
                 from /usr/include/php/main/php.h:35,                                                                                                                                              
                 from /tmp/php-wkhtmltox/phpwkhtmltox.c:7:                                                                                                                                         
/usr/include/php/Zend/zend_hash.h:171:30: note: declared here                                                                                                                                      
 ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);                                                                                                     
                              ^                                                                                                                                                                    
/tmp/php-wkhtmltox/phpwkhtmltox.c: In function 'wkhtmltox_set_params':                                                                                                                             
/tmp/php-wkhtmltox/phpwkhtmltox.c:172:13: warning: passing argument 2 of 'zend_hash_get_current_data_ex' from incompatible pointer type [enabled by default]                                       
             zend_hash_get_current_data_ex(params_hash, (void **)&data, &pointer) == SUCCESS;                                                                                                      
             ^                                                                                                                                                                                     
In file included from /usr/include/php/Zend/zend.h:36:0,                                                                                                                                           
                 from /usr/include/php/main/php.h:35,                                                                                                                                              
                 from /tmp/php-wkhtmltox/phpwkhtmltox.c:7:                                                                                                                                         
/usr/include/php/Zend/zend_hash.h:171:30: note: expected 'HashPosition *' but argument is of type 'void **'                                                                                        
 ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);                                                                                                     
                              ^                                                                                                                                                                    
/tmp/php-wkhtmltox/phpwkhtmltox.c:172:13: error: too many arguments to function 'zend_hash_get_current_data_ex'
             zend_hash_get_current_data_ex(params_hash, (void **)&data, &pointer) == SUCCESS; 
             ^
In file included from /usr/include/php/Zend/zend.h:36:0,
                 from /usr/include/php/main/php.h:35,
                 from /tmp/php-wkhtmltox/phpwkhtmltox.c:7:
/usr/include/php/Zend/zend_hash.h:171:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
                              ^
/tmp/php-wkhtmltox/phpwkhtmltox.c:177:9: warning: passing argument 2 of 'zend_hash_get_current_key_ex' from incompatible pointer type [enabled by default]
         if (zend_hash_get_current_key_ex(params_hash, &key, &key_len, &index, 0, &pointer) == HASH_KEY_IS_STRING) {
         ^
In file included from /usr/include/php/Zend/zend.h:36:0,
                 from /usr/include/php/main/php.h:35,
                 from /tmp/php-wkhtmltox/phpwkhtmltox.c:7:
/usr/include/php/Zend/zend_hash.h:168:30: note: expected 'struct zend_string **' but argument is of type 'char **'
 ZEND_API int   ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
                              ^
/tmp/php-wkhtmltox/phpwkhtmltox.c:177:9: warning: passing argument 3 of 'zend_hash_get_current_key_ex' from incompatible pointer type [enabled by default]
         if (zend_hash_get_current_key_ex(params_hash, &key, &key_len, &index, 0, &pointer) == HASH_KEY_IS_STRING) {
         ^
In file included from /usr/include/php/Zend/zend.h:36:0,
                 from /usr/include/php/main/php.h:35,
                 from /tmp/php-wkhtmltox/phpwkhtmltox.c:7:
/usr/include/php/Zend/zend_hash.h:168:30: note: expected 'zend_ulong *' but argument is of type 'int *'
 ZEND_API int   ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
                              ^
/tmp/php-wkhtmltox/phpwkhtmltox.c:177:9: warning: passing argument 4 of 'zend_hash_get_current_key_ex' from incompatible pointer type [enabled by default]
         if (zend_hash_get_current_key_ex(params_hash, &key, &key_len, &index, 0, &pointer) == HASH_KEY_IS_STRING) {
         ^
In file included from /usr/include/php/Zend/zend.h:36:0,
                 from /usr/include/php/main/php.h:35,
                 from /tmp/php-wkhtmltox/phpwkhtmltox.c:7:
/usr/include/php/Zend/zend_hash.h:168:30: note: expected 'HashPosition *' but argument is of type 'long int *'
 ZEND_API int   ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
                              ^
/tmp/php-wkhtmltox/phpwkhtmltox.c:177:9: error: too many arguments to function 'zend_hash_get_current_key_ex'
         if (zend_hash_get_current_key_ex(params_hash, &key, &key_len, &index, 0, &pointer) == HASH_KEY_IS_STRING) {
         ^
In file included from /usr/include/php/Zend/zend.h:36:0,
                 from /usr/include/php/main/php.h:35,
                 from /tmp/php-wkhtmltox/phpwkhtmltox.c:7:
/usr/include/php/Zend/zend_hash.h:168:30: note: declared here
 ZEND_API int   ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
                              ^
/tmp/php-wkhtmltox/phpwkhtmltox.c:179:22: error: 'IS_BOOL' undeclared (first use in this function)
                 case IS_BOOL:
                      ^
/tmp/php-wkhtmltox/phpwkhtmltox.c:179:22: note: each undeclared identifier is reported only once for each function it appears in
make: *** [phpwkhtmltox.lo] Error 1

any hints?

php command-line works fine, apache segfaults

I've compiled/installed php-wkhtmltox on MAMP 2.1.1 on OSX 10.7.4. I can run the test_pdf.php script via MAMP's command-line php and it works just fine, but when I attempt to load a script through MAMP's httpd (Apache/2.2.22) via a web browser, httpd segfaults.

Here's one of my httpd crashlogs: http://pastebin.com/mn2xe11P

I've compiled everything from source, as per the instructions here: http://marcus.bointon.com/compiling-wkhtmltopdf-on-mac-os-x-10-7-lion/

Any suggestions would be appreciated!

phpwkhtmltox install on UBUNTU

Hi!
I couldn't make it works until i copy the libwkhtmltox.so with another name libwkhtmltox.so.0
Heres my files list what worked:
/usr/local/include/wkhtmltox
/usr/local/lib/libwkhtmltox.so
/usr/local/lib/libwkhtmltox.so.0

why so slow?

It is very slow to create a new picture.
But the rebuild is very fast.
Why is this?

Extension does not load

i686, Ubuntu
I have installed i386 libwkhtmltox and php-wkhtmltox exactly according your instructions, added appropriate line in php.ini, copied extension file to php standart extensions library, but the extension does not appear in phpinfo output...

Configuration

Hi!

Anybody can set disable-smart-shrinking?
I have few cli arguments, but i can't find a documentation how can it be passed to wkhtmltopdf via phpwkhtmltox...
wkhtmltopdf/src/lib/pdfsettings.cc contains some configuration, but not all...

Failure with file path as 'page' parameter

I've got this working great with URLs and even STDIN via a PHP command line script.
However, it seems to fail with local file paths. I've even tried prefixing them with 'file://' but no joy.

According to the settings documentation, the 'page' parameter can be a path:

  • "The URL or path of the web page to convert, if "-" input is read from stdin."

When run via PHP command line, the function just returns false and no error is raised.
When run via PHP-FPM (fast cgi) the server gets a bad gateway, and no error is logged.

Is this expected behaviour? i.e. are local file paths supported?

centos build problem

I had following issue and solved by installing qt-devel

issue:
configure: error: libwkhtmltox version 0.10 or later required

solution
yum install qt qt-devel

I know it's the wrong place to post, but i couldn't find the solution elsewhere, so i wanted to share somewhere.

checking for wkhtmltopdf_init in -lwkhtmltox... no (CentOS 5)

"I'm getting an error when trying to configure it. I'm on Cent OS 5, I've got libwkhtmltox.so (version 10.0) in /usr/local/lib and that path is in $LD_LIBRARY_PATH, and i've got the folder wkhtmltox and its contents in /usr/local/include, which is in my $PATH. I've also got wkhtmltox in /usr/local/bin, which means I can run it through the command line no problems. when I run ./configure, it finds the library, and then on the next line looks for "wkhtmltopdf_init in -lwkhtmltox... no", then tells me I need libwkhtmltox version 0.10 or later."

Installation on Ubuntu Precise failing

Trying to get this installed on Precise, I had it working on a previous version of Ubuntu, but since my upgrade I can not get it to recompile. I have rebuilt QT and libwkhtmltox.

Here is what happens when I try to configure php-wkhtmltox:

http://pastebin.com/YuHeZ9UE

Any help would be greatly appreciated.

I can't find any help online.

I am running:

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

php: malloc(): memory corruption

Hi,

When I use wkhtmltox_create() function in php script I get php: malloc(): memory corruption error.

Following are the details of my system configuration : -

  1. Os :- CentOS release 5.9 (Final) X86_64
  2. I compiled wkhtmltopdf 0.10.0 rc2 which is compiled against wkhtmltopdf patched qt.
  3. I am using /usr/local/lib/libwkhtmltox.so and /usr/local/include/wkhtmltox from the same source.

Please help me to find out what thing is causing this error. wkhtmltopdf from command line is working fine.

Following is the Backtrace for the same :-

*** glibc detected *** php: malloc(): memory corruption: 0x000000001b989cd0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3f4a0721be]
/lib64/libc.so.6(__libc_malloc+0x6e)[0x3f4a073f6e]
/usr/lib64/libstdc++.so.6(_Znwm+0x1d)[0x2b7778dde25d]
/usr/local/lib/libwkhtmltox.so.0[0x2b777504b4af]
/usr/local/lib/libwkhtmltox.so.0(_ZN11wkhtmltopdf8settings9PdfGlobal3setEPKcRK7QString+0x24)[0x2b7775049de4]
/usr/local/lib/libwkhtmltox.so.0(wkhtmltopdf_set_global_setting+0x2c)[0x2b77750663cc]
/usr/lib64/php/modules/phpwkhtmltox.so(wkhtmltox_set_params+0xfd)[0x2b7774e224ad]
/usr/lib64/php/modules/phpwkhtmltox.so(zif_wkhtmltox_convert+0xed)[0x2b7774e225dd]
php[0x5e9e99]
php(execute+0x1cb)[0x5e8f9b]
php(zend_execute_scripts+0x155)[0x5c21f5]
php(php_execute_script+0x1d8)[0x5718c8]
php[0x64c326]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x3f4a01d9c4]
php[0x422509]
======= Memory map: ========
00400000-006e2000 r-xp 00000000 fd:00 2139048 /usr/bin/php
008e2000-00937000 rw-p 002e2000 fd:00 2139048 /usr/bin/php
00937000-00951000 rw-p 00937000 00:00 0
00b36000-00b40000 rw-p 00336000 fd:00 2139048 /usr/bin/php
1b73e000-1b999000 rw-p 1b73e000 00:00 0 [heap]
3f49c00000-3f49c1c000 r-xp 00000000 fd:00 622964 /lib64/ld-2.5.so
3f49e1c000-3f49e1d000 r--p 0001c000 fd:00 622964 /lib64/ld-2.5.so
3f49e1d000-3f49e1e000 rw-p 0001d000 fd:00 622964 /lib64/ld-2.5.so
3f4a000000-3f4a14f000 r-xp 00000000 fd:00 622965 /lib64/libc-2.5.so
3f4a14f000-3f4a34f000 ---p 0014f000 fd:00 622965 /lib64/libc-2.5.so
3f4a34f000-3f4a353000 r--p 0014f000 fd:00 622965 /lib64/libc-2.5.so
3f4a353000-3f4a354000 rw-p 00153000 fd:00 622965 /lib64/libc-2.5.so
3f4a354000-3f4a359000 rw-p 3f4a354000 00:00 0
3f4a400000-3f4a402000 r-xp 00000000 fd:00 622967 /lib64/libdl-2.5.so
3f4a402000-3f4a602000 ---p 00002000 fd:00 622967 /lib64/libdl-2.5.so
3f4a602000-3f4a603000 r--p 00002000 fd:00 622967 /lib64/libdl-2.5.so
3f4a603000-3f4a604000 rw-p 00003000 fd:00 622967 /lib64/libdl-2.5.so
3f4a800000-3f4a816000 r-xp 00000000 fd:00 622971 /lib64/libpthread-2.5.so
3f4a816000-3f4aa16000 ---p 00016000 fd:00 622971 /lib64/libpthread-2.5.so
3f4aa16000-3f4aa17000 r--p 00016000 fd:00 622971 /lib64/libpthread-2.5.so
3f4aa17000-3f4aa18000 rw-p 00017000 fd:00 622971 /lib64/libpthread-2.5.so
3f4aa18000-3f4aa1c000 rw-p 3f4aa18000 00:00 0
3f4ac00000-3f4ac82000 r-xp 00000000 fd:00 622973 /lib64/libm-2.5.so
3f4ac82000-3f4ae81000 ---p 00082000 fd:00 622973 /lib64/libm-2.5.so
3f4ae81000-3f4ae82000 r--p 00081000 fd:00 622973 /lib64/libm-2.5.so
3f4ae82000-3f4ae83000 rw-p 00082000 fd:00 622973 /lib64/libm-2.5.so
3f4b000000-3f4b014000 r-xp 00000000 fd:00 622983 /lib64/libz.so.1.2.3
3f4b014000-3f4b213000 ---p 00014000 fd:00 622983 /lib64/libz.so.1.2.3
3f4b213000-3f4b214000 rw-p 00013000 fd:00 622983 /lib64/libz.so.1.2.3
3f4b400000-3f4b415000 r-xp 00000000 fd:00 622981 /lib64/libselinux.so.1
3f4b415000-3f4b615000 ---p 00015000 fd:00 622981 /lib64/libselinux.so.1
3f4b615000-3f4b617000 rw-p 00015000 fd:00 622981 /lib64/libselinux.so.1
3f4b617000-3f4b618000 rw-p 3f4b617000 00:00 0
3f4b800000-3f4b83b000 r-xp 00000000 fd:00 622980 /lib64/libsepol.so.1
3f4b83b000-3f4ba3b000 ---p 0003b000 fd:00 622980 /lib64/libsepol.so.1
3f4ba3b000-3f4ba3c000 rw-p 0003b000 fd:00 622980 /lib64/libsepol.so.1
3f4ba3c000-3f4ba46000 rw-p 3f4ba3c000 00:00 0
3f4bc00000-3f4bc07000 r-xp 00000000 fd:00 622972 /lib64/librt-2.5.so
3f4bc07000-3f4be07000 ---p 00007000 fd:00 622972 /lib64/librt-2.5.so
3f4be07000-3f4be08000 r--p 00007000 fd:00 622972 /lib64/librt-2.5.so
3f4be08000-3f4be09000 rw-p 00008000 fd:00 622972 /lib64/librt-2.5.so
3f4c000000-3f4c015000 r-xp 00000000 fd:00 622974 /lib64/libnsl-2.5.so
3f4c015000-3f4c214000 ---p 00015000 fd:00 622974 /lib64/libnsl-2.5.so
3f4c214000-3f4c215000 r--p 00014000 fd:00 622974 /lib64/libnsl-2.5.so
3f4c215000-3f4c216000 rw-p 00015000 fd:00 622974 /lib64/libnsl-2.5.so
3f4c216000-3f4c218000 rw-p 3f4c216000 00:00 0
3f4c400000-3f4c409000 r-xp 00000000 fd:00 622643 /lib64/libcrypt-2.5.so
3f4c409000-3f4c608000 ---p 00009000 fd:00 622643 /lib64/libcrypt-2.5.so
3f4c608000-3f4c609000 r--p 00008000 fd:00 622643 /lib64/libcrypt-2.5.so
3f4c609000-3f4c60a000 rw-p 00009000 fd:00 622643 /lib64/libcrypt-2.5.so
3f4c60a000-3f4c638000 rw-p 3f4c60a000 00:00 0
3f4c800000-3f4c803000 r-xp 00000000 fd:00 622798 /lib64/libtermcap.so.2.0.8
3f4c803000-3f4ca02000 ---p 00003000 fd:00 622798 /lib64/libtermcap.so.2.0.8
3f4ca02000-3f4ca03000 rw-p 00002000 fd:00 622798 /lib64/libtermcap.so.2.0.8
3f4cc00000-3f4cc11000 r-xp 00000000 fd:00 622979 /lib64/libresolv-2.5.so
3f4cc11000-3f4ce11000 ---p 00011000 fd:00 622979 /lib64/libresolv-2.5.so
3f4ce11000-3f4ce12000 r--p 00011000 fd:00 622979 /lib64/libresolv-2.5.so
3f4ce12000-3f4ce13000 rw-p 00012000 fd:00 622979 /lib64/libresolv-2.5.so
3f4ce13000-3f4ce15000 rw-p 3f4ce13000 00:00 0
3f4d000000-3f4d002000 r-xp 00000000 fd:00 622982 /lib64/libcom_err.so.2.1
3f4d002000-3f4d201000 ---p 00002000 fd:00 622982 /lib64/libcom_err.so.2.1
3f4d201000-3f4d202000 rw-p 00001000 fd:00 622982 /lib64/libcom_err.so.2.1
3f4d400000-3f4d402000 r-xp 00000000 fd:00 622978 /lib64/libkeyutils-1.2.so
3f4d402000-3f4d601000 ---p 00002000 fd:00 622978 /lib64/libkeyutils-1.2.so
3f4d601000-3f4d602000 rw-p 00001000 fd:00 622978 /lib64/libkeyutils-1.2.so
3f4d800000-3f4d80f000 r-xp 00000000 fd:00 2140209 /usr/lib64/libbz2.so.1.0.3
3f4d80f000-3f4da0e000 ---p 0000f000 fd:00 2140209 /usr/lib64/libbz2.so.1.0.3
3f4da0e000-3f4da10000 rw-p 0000e000 fd:00 2140209 /usr/lib64/libbz2.so.1.0.3
3f4dc00000-3f4dd2d000 r-xp 00000000 fd:00 622984 /lib64/libcrypto.so.0.9.8e
3f4dd2d000-3f4df2c000 ---p 0012d000 fd:00 622984 /lib64/libcrypto.so.0.9.8e
3f4df2c000-3f4df4d000 rw-p 0012c000 fd:00 622984 /lib64/libcrypto.so.0.9.8e
3f4df4d000-3f4df51000 rw-p 3f4df4d000 00:00 0
3f4e000000-3f4e008000 r-xp 00000000 fd:00 2140176 /usr/lib64/libkrb5support.so.0.1
3f4e008000-3f4e207000 ---p 00008000 fd:00 2140176 /usr/lib64/libkrb5support.so.0.1
3f4e207000-3f4e208000 rw-p 00007000 fd:00 2140176 /usr/lib64/libkrb5support.so.0.1
3f4e400000-3f4e424000 r-xp 00000000 fd:00 2140177 /usr/lib64/libk5crypto.so.3.1
3f4e424000-3f4e623000 ---p 00024000 fd:00 2140177 /usr/lib64/libk5crypto.so.3.1
3f4e623000-3f4e625000 rw-p 00023000 fd:00 2140177 /usr/lib64/libk5crypto.so.3.1
3f4e800000-3f4e82c000 r-xp 00000000 fd:00 2140179 /usr/lib64/libgssapi_krb5.so.2.2
3f4e82c000-3f4ea2c000 ---p 0002c000 fd:00 2140179 /usr/lib64/libgssapi_krb5.so.2.2
3f4ea2c000-3f4ea2e000 rw-p 0002c000 fd:00 2140179 /usr/lib64/libgssapi_krb5.so.2.2
3f4ec00000-3f4ec46000 r-xp 00000000 fd:00 622985 /lib64/libssl.so.0.9.8e
3f4ec46000-3f4ee46000 ---p 00046000 fd:00 622985 /lib64/libssl.so.0.9.8e
3f4ee46000-3f4ee4c000 rw-p 00046000 fd:00 622985 /lib64/libssl.so.0.9.8e
3f4f000000-3f4f035000 r-xp 00000000 fd:00 2138494 /usr/lib64/libreadline.so.5.1
3f4f035000-3f4f234000 ---p 00035000 fd:00 2138494 /usr/lib64/libreadline.so.5.1
3f4f234000-3f4f23c000 rw-p 00034000 fd:00 2138494 /usr/lib64/libreadline.so.5.1
3f4f23c000-3f4f23d000 rw-p 3f4f23c000 00:00 0
3f4f400000-3f4f438000 r-xp 00000000 fd:00 2137479 /usr/lib64/libgmp.so.3.3.3
3f4f438000-3f4f638000 ---p 00038000 fd:00 2137479 /usr/lib64/libgmp.so.3.3.3
3f4f638000-3f4f639000 rw-p 00038000 fd:00 2137479 /usr/lib64/libgmp.so.3.3.3
3f4f800000-3f4f802000 r-xp 00000000 fd:00 2139961 /usr/lib64/libXau.so.6.0.0
3f4f802000-3f4fa01000 ---p 00002000 fd:00 2139961 /usr/lib64/libXau.so.6.0.0
3f4fa01000-3f4fa02000 rw-p 00001000 fd:00 2139961 /usr/lib64/libXau.so.6.0.0
3f4fc00000-3f4fc91000 r-xp 00000000 fd:00 2140178 /usr/lib64/libkrb5.so.3.3
3f4fc91000-3f4fe91000 ---p 00091000 fd:00 2140178 /usr/lib64/libkrb5.so.3.3
3f4fe91000-3f4fe95000 rw-p 00091000 fd:00 2140178 /usr/lib64/libkrb5.so.3.3
3f50c00000-3f50d05000 r-xp 00000000 fd:00 2138879 /usr/lib64/libX11.so.6.2.0
3f50d05000-3f50f05000 ---p 00105000 fd:00 2138879 /usr/lib64/libX11.so.6.2.0
3f50f05000-3f50f0c000 rw-p 00105000 fd:00 2138879 /usr/lib64/libX11.so.6.2.0
3f51000000-3f51021000 r-xp 00000000 fd:00 622966 /lib64/libexpat.so.0.5.0
3f51021000-3f51220000 ---p 00021000 fd:00 622966 /lib64/libexpat.so.0.5.0
3f51220000-3f51223000 rw-p 00020000 fd:00 622966 /lib64/libexpat.so.0.5.0
3f51c00000-3f51c7f000 r-xp 00000000 fd:00 786538 /usr/lib64/libfreetype.so.6.3.10
3f51c7f000-3f51e7f000 ---p 0007f000 fd:00 786538 /usr/lib64/libfreetype.so.6.3.10
3f51e7f000-3f51e84000 rw-p 0007f000 fd:00 786538 /usr/lib64/libfreetype.so.6.3.10
3f52000000-3f52134000 r-xp 00000000 fd:00 2140235 /usr/lib64/libxml2.so.2.6.26
3f52134000-3f52333000 ---p 00134000 fd:00 2140235 /usr/lib64/libxml2.so.2.6.26
3f52333000-3f5233c000 rw-p 00133000 fd:00 2140235 /usr/lib64/libxml2.so.2.6.26
3f5233c000-3f5233d000 rw-p 3f5233c000 00:00 0
3f52400000-3f52410000 r-xp 00000000 fd:00 2139291 /usr/lib64/libXext.so.6.4.0
3f52410000-3f52610000 ---p 00010000 fd:00 2139291 /usr/lib64/libXext.so.6.4.0
3f52610000-3f52611000 rw-p 00010000 fd:00 2139291 /usr/lib64/libXext.so.6.4.0
3f52800000-3f52821000 r-xp 00000000 fd:00 2140311 /usr/lib64/libjpeg.so.62.0.0
3f52821000-3f52a20000 ---p 00021000 fd:00 2140311 /usr/lib64/libjpeg.so.62.0.0
3f52a20000-3f52a21000 rw-p 00020000 fd:00 2140311 /usr/lib64/libjpeg.so.62.0.0
3f52c00000-3f52c29000 r-xp 00000000 fd:00 2137509 /usr/lib64/libfontconfig.so.1.1.0
3f52c29000-3f52e29000 ---p 00029000 fd:00 2137509 /usr/lib64/libfontconfig.so.1.1.0
3f52e29000-3f52e33000 rw-p 00029000 fd:00 2137509 /usr/lib64/libfontconfig.so.1.1.0
3f52e33000-3f52e34000 rw-p 3f52e33000 00:00 0
3f53000000-3f53009000 r-xp 00000000 fd:00 2139268 /usr/lib64/libXrender.so.1.3.0
3f53009000-3f53208000 ---p 00009000 fd:00 2139268 /usr/lib64/libXrender.so.1.3.0
3f53208000-3f53209000 rw-p 00008000 fd:00 2139268 /usr/lib64/libXrender.so.1.3.0
3f53800000-3f53823000 r-xp 00000000 fd:00 2140192 /usr/lib64/libpng12.so.0.10.0
3f53823000-3f53a23000 ---p 00023000 fd:00 2140192 /usr/lib64/libpng12.so.0.10.0
3f53a23000-3f53a24000 rw-p 00023000 fd:00 2140192 /usr/lib64/libpng12.so.0.10.0
2b776df15000-2b776df17000 rw-p 2b776df15000 00:00 0
2b776df23000-2b776df2d000 rw-p 2b776df23000 00:00 0
2b776df2d000-2b776df34000 r--s 00000000 fd:00 2228481 /usr/lib64/gconv/gconv-modules.cache
2b776df6e000-2b777153c000 r--p 00000000 fd:00 2133760 /usr/lib/locale/locale-archive
2b777153c000-2b777158b000 rw-p 2b777153c000 00:00 0
2b777158b000-2b777159a000 r-xp 00000000 fd:00 2228483 /usr/lib64/php/modules/curl.so
2b777159a000-2b7771799000 ---p 0000f000 fd:00 2228483 /usr/lib64/php/modules/curl.so
2b7771799000-2b777179b000 rw-p 0000e000 fd:00 2228483 /usr/lib64/php/modules/curl.so
2b77717a7000-2b77717e2000 r-xp 00000000 fd:00 2137519 /usr/lib64/libcurl.so.3.0.0
2b77717e2000-2b77719e2000 ---p 0003b000 fd:00 2137519 /usr/lib64/libcurl.so.3.0.0
2b77719e2000-2b77719e4000 rw-p 0003b000 fd:00 2137519 /usr/lib64/libcurl.so.3.0.0
2b77719e4000-2b7771a15000 r-xp 00000000 fd:00 2140147 /usr/lib64/libidn.so.11.5.19
2b7771a15000-2b7771c14000 ---p 00031000 fd:00 2140147 /usr/lib64/libidn.so.11.5.19
2b7771c14000-2b7771c15000 rw-p 00030000 fd:00 2140147 /usr/lib64/libidn.so.11.5.19
2b7771c15000-2b7771e57000 r-xp 00000000 fd:00 2228836 /usr/lib64/php/modules/fileinfo.so
2b7771e57000-2b7772056000 ---p 00242000 fd:00 2228836 /usr/lib64/php/modules/fileinfo.so
2b7772056000-2b7772058000 rw-p 00241000 fd:00 2228836 /usr/lib64/php/modules/fileinfo.so
2b7772058000-2b77720a1000 r-xp 00000000 fd:00 884745 /usr/lib64/php/modules/gd.so
2b77720a1000-2b77722a0000 ---p 00049000 fd:00 884745 /usr/lib64/php/modules/gd.so
2b77722a0000-2b77722a6000 rw-p 00048000 fd:00 884745 /usr/lib64/php/modules/gd.so
2b77722a6000-2b77722aa000 rw-p 2b77722a6000 00:00 0
2b77722b6000-2b77722c6000 r-xp 00000000 fd:00 2140321 /usr/lib64/libXpm.so.4.11.0
2b77722c6000-2b77724c6000 ---p 00010000 fd:00 2140321 /usr/lib64/libXpm.so.4.11.0
2b77724c6000-2b77724c7000 rw-p 00010000 fd:00 2140321 /usr/lib64/libXpm.so.4.11.0
2b77724c7000-2b77724cc000 r-xp 00000000 fd:00 2138694 /usr/lib64/libXdmcp.so.6.0.0
2b77724cc000-2b77726cb000 ---p 00005000 fd:00 2138694 /usr/lib64/libXdmcp.so.6.0.0
2b77726cb000-2b77726cc000 rw-p 00004000 fd:00 2138694 /usr/lib64/libXdmcp.so.6.0.0
2b77726cc000-2b77726d4000 r-xp 00000000 fd:00 2228944 /usr/lib64/php/modules/json.so
2b77726d4000-2b77728d3000 ---p 00008000 fd:00 2228944 /usr/lib64/php/modules/json.so
2b77728d3000-2b77728d4000 rw-p 00007000 fd:00 2228944 /usr/lib64/php/modules/json.so
2b77728d4000-2b77728de000 r-xp 00000000 fd:00 2228947 /usr/lib64/php/modules/ldap.so
2b77728de000-2b7772ade000 ---p 0000a000 fd:00 2228947 /usr/lib64/php/modules/ldap.so
2b7772ade000-2b7772ae1000 rw-p 0000a000 fd:00 2228947 /usr/lib64/php/modules/ldap.so
2b7772aed000-2b7772b05000 r-xp 00000000 fd:00 2140181 /usr/lib64/libsasl2.so.2.0.22
2b7772b05000-2b7772d05000 ---p 00018000 fd:00 2140181 /usr/lib64/libsasl2.so.2.0.22
2b7772d05000-2b7772d06000 rw-p 00018000 fd:00 2140181 /usr/lib64/libsasl2.so.2.0.22
2b7772d06000-2b7772d3f000 r-xp 00000000 fd:00 2140182 /usr/lib64/libldap-2.3.so.0.2.31
2b7772d3f000-2b7772f3f000 ---p 00039000 fd:00 2140182 /usr/lib64/libldap-2.3.so.0.2.31
2b7772f3f000-2b7772f41000 rw-p 00039000 fd:00 2140182 /usr/lib64/libldap-2.3.so.0.2.31
2b7772f41000-2b7772f4e000 r-xp 00000000 fd:00 2140180 /usr/lib64/liblber-2.3.so.0.2.31
2b7772f4e000-2b777314e000 ---p 0000d000 fd:00 2140180 /usr/lib64/liblber-2.3.so.0.2.31
2b777314e000-2b777314f000 rw-p 0000d000 fd:00 2140180 /usr/lib64/liblber-2.3.so.0.2.31
2b777314f000-2b7773350000 r-xp 00000000 fd:00 884743 /usr/lib64/php/modules/mbstring.so
2b7773350000-2b777354f000 ---p 00201000 fd:00 884743 /usr/lib64/php/modules/mbstring.so
2b777354f000-2b777355b000 rw-p 00200000 fd:00 884743 /usr/lib64/php/modules/mbstring.so
2b777355b000-2b7773564000 r-xp 00000000 fd:00 884744 /usr/lib64/php/modules/mcrypt.so
2b7773564000-2b7773763000 ---p 00009000 fd:00 884744 /usr/lib64/php/modules/mcrypt.so
2b7773763000-2b7773765000 rw-p 00008000 fd:00 884744 /usr/lib64/php/modules/mcrypt.so
2b7773771000-2b777379a000 r-xp 00000000 fd:00 2145279 /usr/lib64/libmcrypt.so.4.4.8
2b777379a000-2b7773999000 ---p 00029000 fd:00 2145279 /usr/lib64/libmcrypt.so.4.4.8
2b7773999000-2b777399c000 rw-p 00028000 fd:00 2145279 /usr/lib64/libmcrypt.so.4.4.8
2b777399c000-2b77739a2000 rw-p 2b777399c000 00:00 0
2b77739a2000-2b77739a8000 r-xp 00000000 fd:00 2145277 /usr/lib64/libltdl.so.3.1.4
2b77739a8000-2b7773ba8000 ---p 00006000 fd:00 2145277 /usr/lib64/libltdl.so.3.1.4
2b7773ba8000-2b7773ba9000 rw-p 00006000 fd:00 2145277 /usr/lib64/libltdl.so.3.1.4
2b7773ba9000-2b7773bb4000 r-xp 00000000 fd:00 2228979 /usr/lib64/php/modules/mysql.so
2b7773bb4000-2b7773db4000 ---p 0000b000 fd:00 2228979 /usr/lib64/php/modules/mysql.so
2b7773db4000-2b7773db6000 rw-p 0000b000 fd:00 2228979 /usr/lib64/php/modules/mysql.so
2b7773dc2000-2b7773eec000 r-xp 00000000 fd:00 2393530 /usr/lib64/mysql/libmysqlclient.so.15.0.0
2b7773eec000-2b77740ec000 ---p 0012a000 fd:00 2393530 /usr/lib64/mysql/libmysqlclient.so.15.0.0
2b77740ec000-2b7774133000 rw-p 0012a000 fd:00 2393530 /usr/lib64/mysql/libmysqlclient.so.15.0.0
2b7774133000-2b7774134000 rw-p 2b7774133000 00:00 0
2b7774134000-2b777414f000 r-xp 00000000 fd:00 2228980 /usr/lib64/php/modules/mysqli.so
2b777414f000-2b777434f000 ---p 0001b000 fd:00 2228980 /usr/lib64/php/modules/mysqli.so
2b777434f000-2b7774354000 rw-p 0001b000 fd:00 2228980 /usr/lib64/php/modules/mysqli.so
2b7774354000-2b7774355000 rw-p 2b7774354000 00:00 0
2b7774355000-2b777436b000 r-xp 00000000 fd:00 2228977 /usr/lib64/php/modules/pdo.so
2b777436b000-2b777456a000 ---p 00016000 fd:00 2228977 /usr/lib64/php/modules/pdo.so
2b777456a000-2b777456d000 rw-p 00015000 fd:00 2228977 /usr/lib64/php/modules/pdo.so
2b777456d000-2b7774574000 r-xp 00000000 fd:00 884742 /usr/lib64/php/modules/pdo_mysql.so
2b7774574000-2b7774774000 ---p 00007000 fd:00 884742 /usr/lib64/php/modules/pdo_mysql.so
2b7774774000-2b7774775000 rw-p 00007000 fd:00 884742 /usr/lib64/php/modules/pdo_mysql.so
2b7774775000-2b777477b000 r-xp 00000000 fd:00 2228978 /usr/lib64/php/modules/pdo_sqlite.so
2b777477b000-2b777497a000 ---p 00006000 fd:00 2228978 /usr/lib64/php/modules/pdo_sqlite.so
2b777497a000-2b777497b000 rw-p 00005000 fd:00 2228978 /usr/lib64/php/modules/pdo_sqlite.so
2b7774987000-2b77749e0000 r-xp 00000000 fd:00 2140211 /usr/lib64/libsqlite3.so.0.8.6
2b77749e0000-2b7774bdf000 ---p 00059000 fd:00 2140211 /usr/lib64/libsqlite3.so.0.8.6
2b7774bdf000-2b7774be2000 rw-p 00058000 fd:00 2140211 /usr/lib64/libsqlite3.so.0.8.6
2b7774be2000-2b7774c1f000 r-xp 00000000 fd:00 2228945 /usr/lib64/php/modules/phar.so
2b7774c1f000-2b7774e1e000 ---p 0003d000 fd:00 2228945 /usr/lib64/php/modules/phar.so
2b7774e1e000-2b7774e21000 rw-p 0003c000 fd:00 2228945 /usr/lib64/php/modules/phar.so
2b7774e21000-2b7774e23000 r-xp 00000000 fd:00 884747 /usr/lib64/php/modules/phpwkhtmltox.so
2b7774e23000-2b7775022000 ---p 00002000 fd:00 884747 /usr/lib64/php/modules/phpwkhtmltox.so
2b7775022000-2b7775023000 rw-p 00001000 fd:00 884747 /usr/lib64/php/modules/phpwkhtmltox.so
2b7775023000-2b777507a000 r-xp 00000000 fd:00 2145275 /usr/local/lib/libwkhtmltox.so.0.10.0
2b777507a000-2b777527a000 ---p 00057000 fd:00 2145275 /usr/local/lib/libwkhtmltox.so.0.10.0
2b777527a000-2b777527d000 rw-p 00057000 fd:00 2145275 /usr/local/lib/libwkhtmltox.so.0.10.0
2b777527d000-2b7776a0f000 r-xp 00000000 fd:00 3574585 /home/pdf_project/php_extension/wkqt/lib/libQtWebKit.so.4.9.2
2b7776a0f000-2b7776c0e000 ---p 01792000 fd:00 3574585 /home/pdf_project/php_extension/wkqt/lib/libQtWebKit.so.4.9.2
2b7776c0e000-2b7776db0000 rw-p 01791000 fd:00 3574585 /home/pdf_project/php_extension/wkqt/lib/libQtWebKit.so.4.9.2
2b7776db0000-2b7776dda000 rw-p 2b7776db0000 00:00 0
2b7776dda000-2b7776e36000 r-xp 00000000 fd:00 3574433 /home/pdf_project/php_extension/wkqt/lib/libQtSvg.so.4.8.2
2b7776e36000-2b7777035000 ---p 0005c000 fd:00 3574433 /home/pdf_project/php_extension/wkqt/lib/libQtSvg.so.4.8.2
2b7777035000-2b7777038000 rw-p 0005b000 fd:00 3574433 /home/pdf_project/php_extension/wkqt/lib/libQtSvg.so.4.8.2
2b7777038000-2b7777500000 r-xp 00000000 fd:00 3574333 /home/pdf_project/php_extension/wkqt/lib/libQtXmlPatterns.so.4.8.2
2b7777500000-2b7777700000 ---p 004c8000 fd:00 3574333 /home/pdf_project/php_extension/wkqt/lib/libQtXmlPatterns.so.4.8.2
2b7777700000-2b7777741000 rw-p 004c8000 fd:00 3574333 /home/pdf_project/php_extension/wkqt/lib/libQtXmlPatterns.so.4.8.2
2b7777741000-2b7777742000 rw-p 2b7777741000 00:00 0
2b7777742000-2b7778257000 r-xp 00000000 fd:00 3572722 /home/pdf_project/php_extension/wkqt/lib/libQtGui.so.4.8.2
2b7778257000-2b7778457000 ---p 00b15000 fd:00 3572722 /home/pdf_project/php_extension/wkqt/lib/libQtGui.so.4.8.2
2b7778457000-2b77784ad000 rw-p 00b15000 fd:00 3572722 /home/pdf_project/php_extension/wkqt/lib/libQtGui.so.4.8.2
2b77784ad000-2b77784af000 rw-p 2b77784ad000 00:00 0
2b77784af000-2b7778608000 r-xp 00000000 fd:00 3572423 /home/pdf_project/php_extension/wkqt/lib/libQtNetwork.so.4.8.2
2b7778608000-2b7778807000 ---p 00159000 fd:00 3572423 /home/pdf_project/php_extension/wkqt/lib/libQtNetwork.so.4.8.2
2b7778807000-2b7778810000 rw-p 00158000 fd:00 3572423 /home/pdf_project/php_extension/wkqt/lib/libQtNetwork.so.4.8.2
2b7778810000-2b7778b05000 r-xp 00000000 fd:00 3571733 /home/pdf_project/php_extension/wkqt/lib/libQtCore.so.4.8.2
2b7778b05000-2b7778d05000 ---p 002f5000 fd:00 3571733 /home/pdf_project/php_extension/wkqt/lib/libQtCore.so.4.8.2
2b7778d05000-2b7778d15000 rw-p 002f5000 fd:00 3571733 /home/pdf_project/php_extension/wkqt/lib/libQtCore.so.4.8.2
2b7778d21000-2b7778e07000 r-xp 00000000 fd:00 2140199 /usr/lib64/libstdc++.so.6.0.8
2b7778e07000-2b7779006000 ---p 000e6000 fd:00 2140199 /usr/lib64/libstdc++.so.6.0.8
2b7779006000-2b777900c000 r--p 000e5000 fd:00 2140199 /usr/lib64/libstdc++.so.6.0.8
2b777900c000-2b777900f000 rw-p 000eb000 fd:00 2140199 /usr/lib64/libstdc++.so.6.0.8
2b777900f000-2b7779021000 rw-p 2b777900f000 00:00 0
2b7779021000-2b777902e000 r-xp 00000000 fd:00 622986 /lib64/libgcc_s-4.1.2-20080825.so.1
2b777902e000-2b777922e000 ---p 0000d000 fd:00 622986 /lib64/libgcc_s-4.1.2-20080825.so.1
2b777922e000-2b777922f000 rw-p 0000d000 fd:00 622986 /lib64/libgcc_s-4.1.2-20080825.so.1
2b777922f000-2b7779243000 r-xp 00000000 fd:00 2228946 /usr/lib64/php/modules/zip.so
2b7779243000-2b7779442000 ---p 00014000 fd:00 2228946 /usr/lib64/php/modules/zip.so
2b7779442000-2b7779445000 rw-p 00013000 fd:00 2228946 /usr/lib64/php/modules/zip.so
2b7779451000-2b777945b000 r-xp 00000000 fd:00 622618 /lib64/libnss_files-2.5.so
2b777945b000-2b777965a000 ---p 0000a000 fd:00 622618 /lib64/libnss_files-2.5.so
2b777965a000-2b777965b000 r--p 00009000 fd:00 622618 /lib64/libnss_files-2.5.so
2b777965b000-2b777965c000 rw-p 0000a000 fd:00 622618 /lib64/libnss_files-2.5.so
2b777965c000-2b77796df000 rw-p 2b777965c000 00:00 0
2b77796df000-2b77796e1000 r-xp 00000000 fd:00 2228454 /usr/lib64/gconv/UTF-16.so
2b77796e1000-2b77798e0000 ---p 00002000 fd:00 2228454 /usr/lib64/gconv/UTF-16.so
2b77798e0000-2b77798e2000 rw-p 00001000 fd:00 2228454 /usr/lib64/gconv/UTF-16.so
2b77798e2000-2b77798e5000 r--s 00000000 fd:00 917573 /var/cache/fontconfig/e3ead4b767b8819993a6fa3ae306afa9-x86-64.cache-2
2b77798e5000-2b77798ed000 r--s 00000000 fd:00 918520 /var/cache/fontconfig/b79f3aaa7d385a141ab53ec885cc22a8-x86-64.cache-2
2b777c000000-2b777c021000 rw-p 2b777c000000 00:00 0
2b777c021000-2b7780000000 ---p 2b777c021000 00:00 0
7ffff19fb000-7ffff1a10000 rw-p 7ffffffe9000 00:00 0 [stack]
7ffff1b03000-7ffff1b06000 r-xp 7ffff1b03000 00:00 0 [vdso]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vsyscall]
Aborted

string input(html), string output(pdf) and errorlog

hi,

we are testing an wkhtmltopdf integration in our php erp software for formular generation by now. our php.ini disables all exec function of php for security reasons. so we was very glad to see a php-extension of wkhtmltox ;). thx for that great work !

but i think 3 important thinks are missing:

  • string input (html)
  • string output (pdf)
  • error/warning output

i checked the base lib of wkhtmltox. the lib provides some api to integrate these features. sadly my knowledge in c programming and php extension development is realy poor. i tried it also to integrate these features. i don't know if it is the best way, but after hours i got it working. if you want i can send you the files or do a pull request. but i'm new to github and don't know how to do it ;)

greetings from germany

dominik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.