Hi,
thanks for your question, and sorry for the trouble.
I see what you mean, but unfortunately, I don’t know how the PDF output can be influenced 🙁 This is done by an external JavaScript library.
Maybe you could create a PDF for this manually (e.g. in Excel) and offer it for download on that table’s page?
Regards,
Tobias
Hi,
I’m from panama in my case I modified the tablepress-datatables-buttons.php code and added an additional button to place a configuration according to the documentation found on the datatables site for the cases of pdfHtml5 below I detail my code
$shirt = array(
'extend' => 'pdfHtml5',
'text'=>'PDFHorizontal',
'orientation' => 'landscape',
'pageSize' => 'TABLOID',
);
$parameters['buttons'] = '"buttons":['.json_encode($shirt).','.implode(',',$js_options['datatables_buttons']).']';
return $parameters;
}
For me it was the solution without affecting the rest of the buttons that use the shortcode with this code by pressing the button it automatically generates my horizontal pdf plus I put the page size in “TABLOID” because my tables have many columns.
Hi,
very nice! Thanks for sharing this solution!
Best wishes,
Tobias
Thanks for sharing, @bonargerodriguez – this is just what I’m looking for. However, I’m not sure where in the tablepress-datatables-buttons.php file to insert the code. Can you please advise?
Also, to show the new option as a button on the page, do I just add “pdfHtml5” to the shortcode, or is it something else?
Thanks again,
Jason
Hi Jason,
unfortunately, I don’t know the details to that solution, but let’s hope that bonargerodriguez can maybe help.
Regards,
Tobias