Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ilclaudio on
Hi all,
we are using the module Webform to offer some complex forms to the customers on a Drupal8 site.
We have to produce a PDF copy of each submission.
I've seen that there is not a Drupal8 version of Webform2PDF.
Which is, according to you, the best alternative?
Thank you very much
Claudio
Comments
not sure ...
Might the following D8 module help?
https://www.drupal.org/project/fillpdf
I have not used this module, but knew of it, so you may want to explore its viability for your application.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
Thank you Sprite, but it
Thank you Sprite, but it seems that this module uses an external service: https://fillpdf.io/ that would be an unplanned additional cost.
Most of the CMS provides free tools to export contents in PDF.
Hi Claudio
Hi Claudio
We did extensive work on this, and ran up against a number of problems.
In the end we redeveloped in 7.
We originally used a third-party service. There was an amazing online service that for a small monthly fee converted the page to a PDF. This required some javascript they provided to embed on the page in question. It was easy to implement and produced a perfect result. For some reason they closed up about a year ago, which we only found out when the customer told us it wasn't working anymore. So beware of a service like this, but it may be the only way to get a very 'accurate' result.
Using the MPDF/TCPDF and print PDF modules. Using a template this provided a reasonable outcome for us (https://www.drupal.org/project/print). Having said this, there was a lot of work to get it to look 'right'
Yes Petar I prefer do not use
Yes Petar I prefer do not use external services but at the same time I can't use D7.
I'll try these two modules:
https://www.drupal.org/project/printable
https://www.drupal.org/project/entity_print
If these won't work then I'll try some external library not strictly related with Drupal.
It's strange that with D8 doesn't provide a way to export contents in the PDF format.
Thank you
cld
Did you succeed?
@ilclaudio did you succeed at this?
Yes, we ended up using
Yes, we ended up using wkhtmltopdf (via Drupal 7). I don't know about Drupal 8.
We uploaded the executable file for wkhtmltopdf to our server, ensuring it worked on our hosting environment, and pointed the print module to use it. I can't remember exactly where we go the executable file, it was a bit difficult to find, but it worked perfectly once we got it on the server.
The setup is a little more hassle than other PDF print plugins, however wkhtmltopdf is the only solution which will either reproduce exactly what you see in your browser, or work well with a print template page. It's the best solution.
WKHTMLTOPDF installed but can't configure
@petarB I installed wkhtmltopdf to my server, it runs great in command line and in a small php script. But within Drupal following the extension install, I cannot figure out how to provide the path to wkhtmltopdf.
Any help is appreciated!
Thanks!
=-=
via the print.module configuration and using a relative path to the library. The module should have an INSTALL.txt or README.txt that should provide direction.
I can confirm using a
Edit: disregard my previously edited post.
We used Libraries and put the executable here:
"sites/all/libraries/wkhtmltopdf"
The other KEY issue was the permissions as I recall. You may need to set your permissions to be executable for the user.
Try the PrintFriendly module.
Try the PrintFriendly module. https://www.drupal.org/project/printfriendly
There is a stable version for Drupal 8. I run it on 8.6.1.
Webform Entity Print integration module
The Webform module now includes a Webform Entity Print integration module, which handles downloading, exporting, and attaching generated PDF documents. Additionally, the Webform module allows the generated PDF document's header, footer, and CSS to be customized.
https://www.jrockowitz.com/blog/webform-entity-print-pdf
Thank you!
Thank you!
while(alive){learn();}