This topic contains 7 replies, has 2 voices, and was last updated by Sean Sean 2 years, 6 months ago.

Horizontal export to pdf


  • networksystems
    Participant

    Posts: 7
    Member Reply #6481

    Hello, is any chance to change settings in pdf export? I need horizontal page.

    Cheers

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #6492

    Hi,

    Could you please provide more details. Which plugin or page are you referring to ? If you are referring to the datatable button’s PDF export feature you can get all available info about the plugin from its official documentation: https://datatables.net/reference/button/pdf

    Thanks.


    networksystems
    Participant

    Posts: 7
    Member Reply #6511

    Hi,

    i got datatable with many columns, i want print all on one page, so i have to change page setting to landscape in pdf export config, but dont know where to find it.

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #6524

    Hi,

    Please refer below settings:

    extend: ‘pdfHtml5’,
    orientation: ‘landscape’,
    pageSize: ‘LEGAL’

    For more info please check: https://datatables.net/extensions/buttons/examples/html5/pdfPage.html

    Thanks.


    networksystems
    Participant

    Posts: 7
    Member Reply #6529

    Hi, i cant find that settings in:

    /assets/global/scripts/datatable.js" and
    /assets/global/plugins/datatables/datatables.min.js

    added manually this, but it aint work

    // default settings
    options = $.extend(true, {
    src: "", // actual table
    filterApplyAction: "filter",
    filterCancelAction: "filter_cancel",
    resetGroupActionInputOnSuccess: true,
    loadingMessage: 'Loading...',
    dataTable: {
    "dom": "<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'<'table-group-actions pull-right'>>r><'table-responsive't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>>", // datatable layout
    "pageLength": 10, // default records per page
    "orientation": landscape,
    "pageSize": LEGAL,
    "language": { // language settings
    // metronic spesific
    "metronicGroupActions": "_TOTAL_ records selected:  ",
    "metronicAjaxRequestGeneralError": "Could not complete request. Please check your internet connection",

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #6558

    Hi,

    If you are referring to http://www.keenthemes.com/preview/metronic/theme/admin_1/table_datatables_buttons.html page then you can find the demo datatable initialization code in “assets/pages/scripts/table-datatables-buttons.js”. If you like to edit this demo script please change the script filename in HTML from table-datatables-buttons.min.js to table-datatables-buttons.js.

    Also you should learn more about the datatables plugin from the official documentation: http://datatables.net

    Thanks.


    networksystems
    Participant

    Posts: 7
    Member Reply #6573

    OK, thanks for info

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #6583

    You are welcome 🙂

You must be logged in to reply to this topic.