labcold Member Licensed User Longtime User May 17, 2022 #1 I have a project which is using B4J server with websockets to render HTML including some complex tables. All works well with the setup code as follows: Code: Copy 'update table list devs.RunMethod("dataTable", Array As Object(CreateMap("bLengthChange": False, "bPaginate": False, "sScrollY": "700px", "bInfo": False, "bAutoWidth": True, "bDestroy": True, "dom": "Bfrtip"))) The issue I have is with the PDF export button. It works as expected and creates the PDF correctly using the PDFmake and associated plug ins. BUT I want to set the orientation to Landscape and I cannot find how to pass that information in the table initialise statement above. I need to add: Code: Copy dom: 'Bfrtip', buttons: [ { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'LEGAL' } ] I have tried to add it as an object, as JSON but I cant get it to work. Can anyone help? Im sure its a simple case of formatting or casting but I dont seem to be able to make it work. Yes of course it was a stupid mistake (tried to add another map) but just added array as object(.......) and it works fine Last edited: May 18, 2022
I have a project which is using B4J server with websockets to render HTML including some complex tables. All works well with the setup code as follows: Code: Copy 'update table list devs.RunMethod("dataTable", Array As Object(CreateMap("bLengthChange": False, "bPaginate": False, "sScrollY": "700px", "bInfo": False, "bAutoWidth": True, "bDestroy": True, "dom": "Bfrtip"))) The issue I have is with the PDF export button. It works as expected and creates the PDF correctly using the PDFmake and associated plug ins. BUT I want to set the orientation to Landscape and I cannot find how to pass that information in the table initialise statement above. I need to add: Code: Copy dom: 'Bfrtip', buttons: [ { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'LEGAL' } ] I have tried to add it as an object, as JSON but I cant get it to work. Can anyone help? Im sure its a simple case of formatting or casting but I dont seem to be able to make it work. Yes of course it was a stupid mistake (tried to add another map) but just added array as object(.......) and it works fine