Hello,

First of all, many thanks for this wonderful module. It would allow me to publish documentation and I am very happy with the result.

Just a few remarks:
* wkhtmltopdf options should be a text field with several lines.
My value is: --header-center '[title]' --footer-font-size 9 --footer-right '[page]' --footer-left 'Copyright xxxxxxxxxx 2010' --footer-center 'http://www.xxxxxxxxxx.com' --margin-bottom 35 --margin-top 35 --footer-line --footer-spacing 20 --header-spacing 20

I cannot add more information.

* The documentation should be updated since wkhtmltopdf does not need X to run. Static binaries are available.

* Also it should more clear that wkhtmltopdf is WAY more interesting than other solutions.
The description on the module page provides information which is difficult to understand and is too negative:

webkit-based tool that actually launches a browser to generate the PDF. Resource hungry: expect to need some 30Mb+ of RAM and some seconds of CPU power. May need to install/compile in your site. Requires an X server, which if you're in a shared host won't be available and you'll lack the resources to install/compile it. The best, if you can run it.

I would suggest:

A binary executable relying on the QT framework, compiled natively on your server platform, either for x32 or x64 architectures, available for both Windows and GNU/Linux environments. Now run without X Server. Supports hearders, footers, CSS and Table of Content and much more. wkhtmltopdf is able to render a page nearly like a PDF printer on a computer. The only drawback is resource usage as wkhtmltopdf executes in its own memory space, not in PHP. But this allows you to render large and complex documents 10 times faster as a PHP class. If you are using a shared hosting solution for Drupal, you may not have the right to execute a custom binary. But if you are able to run custom binaries on your server, this is the preferred solution, don't look further!

CommentFileSizeAuthor
#3 wkhtmltopdfextender.tar_.gz8.63 KBsiliconmeadow

Comments

jayjaydluffy’s picture

subscribing..

also, it's "textarea" i guess.

I wonder why when I form_alter(ed) the form as "textarea" and "row=3", as well as, kept it as "textfield" but increased "maxlength" to 500 to fit my add'l options, the whole options were disregarded, e.g. the header and footer text were gone as well as the page number.

i agree about updating wkhtmltopdf documentation as I'm able to use it on shared host without installing x11 libs etc.

looking forward!

jcnventura’s picture

It can't be a textarea.. It must always be a textfield.. I can increase the maximum though...

siliconmeadow’s picture

StatusFileSize
new8.63 KB

I did my own helper module that does a hook_form_FORM_ID_alter so I can have a textarea instead of the text field. I wanted to do quite a lot with the options. Looking at my own $print_pdf_wkhtmltopdf_options, it's now 432 chars!

I didn't remove the Aroq glue package identifier, I'll leave it up to whoever wants to deal with it.

If you want to add it with the rest of the code for the print module, please feel free. I think that it actually might be better to modify the interface for wkhtmltopdf users, so they can enter each of the options discretely though, rather than using this workaround.

jcnventura’s picture

Status: Active » Fixed

Increased the max size to 500. As written in siliconmeadow's patch, if this field were to be a textarea, you can't insert any line breaks.. Since I don't want to deal with issues stemming from failing to read those instructions, the maximum I could do was to increase the limit.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.