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,
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;
}