Check out example codes for "datatable pdfHtml5 pagesize". It will help you in understanding the concepts better.

Code Example 1

{
   extend: 'pdfHtml5',
   orientation: 'landscape',
   pageSize: 'TABLOID', // TABLOID OR LEGAL
   footer: true,
 }

Learn ReactJs, React Native from akashmittal.com