DataTables with GravityView

DataTables with GravityView

Fanta13Fanta13 Posts: 2Questions: 1Answers: 0

Hi, I'm using the GravityView DataTables extension. I have been able to use the webhooks to change the PDF exported to landscape and to add a message on the top of the page. However, I am unable to add an image. Please help...

Answers

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770

    I'm not familiar with GravityView but here is an example of how to add an image to a PDF export.
    https://datatables.net/extensions/buttons/examples/html5/pdfImage.html

    Kevin

  • Fanta13Fanta13 Posts: 2Questions: 1Answers: 0

    Thanks. Will it be possible to use the GravityView filter and modify it so that I can continue using the DataTables extension of GravityView though?

    Using the original code below, I've changed the line

    $button_config['orientation'] = 'landscape';

    to the one below

    $button_config['messageTop'] = "Custom message goes here";

    ... and it actually works.

    So will it be possible to apply the same concept (in order to add an image) as I'm already using DataTables (albeit via GravityView)? If not, I may have to revert to using a normal table and then apply the DataTables plugin. I've asked GravityView but no joy.

    Original code below from GravityView

    https://docs.gravityview.co/article/378-changing-the-orientation-of-a-pdf-from-portrait-to-landscape

  • ray@otibs.comray@otibs.com Posts: 1Questions: 0Answers: 0

    Hi,

    New here and plan to start sharing resolutions as I resolve them.

    Please share which file did you edit to make your landscape and adding image to PDF.

This discussion has been closed.