not scalable

not scalable

SudiptaSudipta Posts: 23Questions: 0Answers: 0
edited January 2013 in TableTools
Hi,
my debug code is amawil. In my table i have one column with very large data. The generated pdf is not formatted well. The header part was appearing twice.

Replies

  • allanallan Posts: 61,923Questions: 1Answers: 10,153 Site admin
    I suspect this is a limitation of the PDF export, although I don't know why the header would be showing twice. Can you link to a test case please?

    Allan
  • SudiptaSudipta Posts: 23Questions: 0Answers: 0
    [code]
    <%--
    Document : newjsp
    Created on : 3 Dec, 2012, 3:35:16 PM
    Author : Training
    --%>

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE html>




    @import "custom_style.css";
    table.dataTable {
    /*margin: 0 auto;*/
    /*clear: both;*/
    width: 100%;
    /*top: 10000px;*/
    /*:left: 10000px;*/
    }









    JSP Page






    Your scrolling text goes here










    First Name
    Last Name
    Salary
    Place
    Place



    <% for (int i = 1; i <= 2; i++) {
    String s = "";%>

    Taher
    TINWALA
    1000<%=i%>

    <% for (int j = 0; j < 815; j++) {%>
    <%
    s += j + " ";
    // if (j % 10 == 0) {
    %>
    <%
    // s = "";
    // }
    %>
    <%}%>
    <%=s%>


    Hi


    Bye
    <% if (i % 2 == 0) {%>
    <%= i%>
    <%}%>




    <% }%>



















    Column 1
    Column 2
    Column 3
    Column 4



    First Name
    Last Name
    Salary
    Place

    <% for (int i = 1; i <= 20; i++) {%>

    Taher
    TINWALA
    1000
    <%=i%>




    <% }%>








    function getdate(){
    var today = new Date();
    var dd = today.getDate();
    var mm = today.getMonth()+1; //January is 0!

    var yyyy = today.getFullYear();
    if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} today = mm+'-'+dd+'-'+yyyy;
    return today;
    }
    var XlsExtension=".xls";
    var PdfExtension=".pdf";
    //document.write(today);
    $(document).ready(function(){

    TableTools.DEFAULTS.aButtons = [ {
    "sExtends": "pdf",
    "sPdfOrientation": "landscape",
    //"sPdfOrientation": "landscape",
    ///"fnMouseover": function ( nButton, oConfig, oFlash ) {
    // alert( 'Mosue over' );
    //},
    "sButtonText": "",
    //"sTitle":"amc",
    "sToolTip": "Convert to PDF",
    "sFileName": "*"+".pdf"+PdfExtension

    },
    {
    "sExtends": "xls",
    // "sButtonText": " Save for Excel "
    "sFileName": "*.xls"+XlsExtension
    //"sTile": "my title"
    } ];
    TableTools.DEFAULTS.sSwfPath="copy_csv_xls_pdf.swf";
    //TableTools.DEFAULTS.sSwfPath="ZeroClipboard.swf";
    $("#table_id").dataTable({
    "iDisplayLength": 30,
    "bJQueryUI": true,
    "sDom": 'T<"H"r>t<"F"ip>'
    });
    $("#table_id_").dataTable({
    "iDisplayLength": 30,
    "bJQueryUI": true,
    "sDom": 'T<"H"r>t<"F">'
    });
    });



    /* $(document).ready( function () {
    $('#table_id').dataTable( {
    "iDisplayLength": 30,
    "bJQueryUI": false,
    "sPaginationType": "full_numbers",
    "sDom": 'T<"H"r>t<"F">',

    "oTableTools": {
    "sSwfPath": "copy_csv_xls_pdf.swf",
    "aButtons": [
    {
    "sExtends": "copy",
    "sButtonText": " Copy to clipboard "
    },
    {
    "sExtends": "pdf",
    //"sPdfOrientation": "landscape",
    ///"fnMouseover": function ( nButton, oConfig, oFlash ) {
    // alert( 'Mosue over' );
    //},
    "sButtonText": "",
    "sToolTip": "Convert to PDF",
    "sFileName": "*"+getdate()+".pdf"
    },
    {
    "sExtends": "xls",
    // "sButtonText": " Save for Excel "
    },
    {
    "sExtends": "print",
    //"sButtonText": "print"
    }
    ]
    /*"aButtons": [
    {
    "sExtends": "print",
    "fnInit": function(node){formatTableToolsButton(node, 'ui-icon-print');}
    }
    ]*/
    // }
    //} );
    // } );




    [/code]



    this is my test case. The table with id table_id is showing the problem.
This discussion has been closed.