Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Simon Bengtsson
    Why do you want to merge them? You could bundle them together with browserify or webpack.
    when i create a sample plugin inside the jspdf-debug that method get listed, but not from autotable plugin
    Also that particular issues TypeError: doc.autoTable is not a function not showing everytime
    I occurs randomly
    i have no clue what to do
    im Using require js in my application,Im not sure how to use either of them, TypeError: doc.autoTable is not a function
    Kindly help me
    Simon Bengtsson
    Could you create a mcve and post it here? Have you looked at the requirejs example in the examples folder?
    With the help of requirejs only i created, i trying to create mcv to replicate the issue, but the problem is it is not a replicating, im not sure what i did wrong in my application, All i have in my project is

    This is how i defined it

    <script src="./jslib/require/require_2.3.3.js" data-main="js/app/config/config"></script>


    baseUrl : "/test/",
    waitSeconds : 160,
    // Define
    paths : {
    "text" : "jslib/require/text",
    "jquery" : "jslib/jquery/jquery-min-2.2.4",
    "underscore" : "jslib/backbone/underscore-1.8.3",
    "backbone" : "jslib/backbone/backbone-1.3.3",
    "marionette" : "jslib/backbone/backbone.marionette-2.4.7",
    "bootstrap" : "jslib/bootstrap/bootstrap-3.3.7",
    "bootstrap-select" : "jslib/bootstrap/bootstrap-select",
    "validation" : "jslib/backbone/backbone-validation-min",
    "stickit" : "jslib/backbone/backbone.stickit-0.9.2",
    "jsnlog" : "jslib/jsnlog/jsnlog-2.7.11",
    "backbone.paginator" : "jslib/backbone/backbone.paginator",
    "backgrid-filter" : "jslib/backgrid/backgrid-filter",
    "backgrid" : "jslib/backgrid/backgrid",
    "backgrid-paginator" : "jslib/backgrid/backgrid-paginator",
    "backgrid-resizecolumns" : "jslib/backgrid/backgrid-sizeable-columns",
    "backgrid-ordercolumns" : "jslib/backgrid/backgrid-orderable-columns",
    "backgrid-group-columns" : "jslib/backgrid/backgrid-grouped-columns",
    "jquery-ui" : "jslib/jquery/jquery-ui.min",
    "bootstrap-tagsinput" : "jslib/bootstrap/bootstrap-tagsinput",
    "backgrid-responsiveGrid" : "jslib/backgrid/backgrid-responsiveGrid",
    "jquery-layout" : "jslib/jquery/jquery-layout",
    "bootstrap-datepicker" : "jslib/bootstrap/bootstrap-datepicker",
    "bootstrap-notify" : "jslib/bootstrap/bootstrap-notify",
    "multiselect" : "jslib/bootstrap/multiselect",
    "typeahead" : "jslib/typeahead/typeahead.bundle",
    "cropper" : "jslib/cropper/cropper",
    "chosen" : "jslib/chosen/chosen.jquery",
    'jspdf' : 'jslib/pdf/jspdf.debug',
    'jspdf-autotable' : 'jslib/pdf/jspdf.plugin.autotable'

    // Sets the configuration for your third party scripts that are not AMD
    // compatible
    shim : {
        // Twitter Bootstrap jQuery plugins
        "bootstrap" : ["jquery", "jquery-ui"],
        "underscore" : ["jquery"],
        // Backbone and Marionette
        "backbone" : {
            "deps" : ["jquery", "underscore"],
            "exports" : "Backbone"
        "marionette" : {
            "deps" : ["jquery", "underscore", "backbone"],
            "exports" : "Marionette"
        "validation" : {
            "deps" : ["jquery", "backbone"],
            "exports" : "Validation"
        "stickit" : ["jquery", "underscore", "backbone"],
        "backgrid" : ["jquery", "underscore", "backbone"],
        "backgrid-paginator" : ["backgrid"],
        "backgrid-resizecolumns" : ["backgrid"],
        "backgrid-ordercolumns" : ["backgrid"],
        "backgrid-group-columns" : ["backgrid"],
        "backgrid-responsiveGrid" : ["backgrid"],
        "jquery-ui" : ["jquery"],
        "jquery-layout" : ["jquery", "jquery-ui"],
        "bootstrap-tagsinput" : ["jquery", "bootstrap"],
        "bootstrap-notify" : ["jquery", "bootstrap"],
        "multiselect" : ["jquery", "bootstrap"],
        "typeahead" : {
            "deps" : ["jquery"]
        "chosen" : {
            "deps" : ["jquery"]
    // Invoke the Init.js
    deps : ["..."]


    ["jsPDF", "jspdf-autotable"],
    var ReportUtils = {
    generatePDF : function(options)
    var doc = new jsPDF('p', 'pt', 'a4');

                doc.autoTable(columns, data, {
                    startY : 75,
                    addPageContent : headerFooter,
                    margin : {
                        top : 75,
                        bottom : 30,
                        horizontal : 7
                    bodyStyles : {
                        valign : 'top'
                    styles : {
                        overflow : 'linebreak',
                        columnWidth : 'wrap'
                    columnStyles : columnStyles
                // Total page number plugin only available in jspdf v1.0+
                if (typeof doc.putTotalPages === 'function')
            }    };
        return ReportUtils;
    Simon Bengtsson
    Did you try removing things until the problem disappear as recommended ok m
    in the link above*
    Im sorry which link...
    Am i doing anything wrong,
    I dont think its a code issue, something else should be wrong... but dont know what and where to check.... :worried: :worried: :worried: :worried: :worried:
    Simon Bengtsson
    If I were to debug your issue I would remove one code line at a time or one dependency at a time until the problem disappeared as recommended in the webpage about mcve above.
    i just notice, when i clear the cache (options-Advanced-Under Network tab-Clear cache(Mozilla Firefox)) it started to working properly some times.. is this kind of browser issue..
    Saurabh Upadhyaya
    is Arabic/Urdu support issue resolved?
    Simon Bengtsson
    Don't think so, but check the utf-8 issue in the jspdf repository
    is utf-8 character supported in jspdf-autotable ? i am trying to export arabic words from html table to pdf with this plugin
    Saurabh Upadhyaya
    @vishyagnik2186 Its not supported. We also want to export html to pdf(arabic). Is any open source available for the same.
    Simon Bengtsson
    Try pdfmake that is based on pdfkit
    Hello, how i get total number of pages?
    var totalPagesExp = "{total_pages_count_string}"; doesnt work
    someone can help me?
    Simon Bengtsson
    Try posting on stack overflow
    Simon Bengtsson
    any help please?
    @simonbengtsson Good morning , i need your help
    Good evening @simonbengtsson any help please
    hi @simonbengtsson
    guys how to break page?
    const doc = new jsPDF();
                    doc.text(7, 15, "Daftar SP2D dengan Status Sudah Cair");
                    doc.autoTable(this.getColumns(), datacair, {
                        startY: 20,
                        margin: { horizontal: 7 },
                        styles: { columnWidth: 'wrap' },
                        columnStyles: {
                            text: { columnWidth: 'auto' },
                            nil: { halign: 'right' },
                            tgl: { halign: 'right' }
                        headerStyles: { halign: 'center' },
                        theme: 'grid'
                    doc.text("Daftar SP2D dengan Status Proses Pencairan", 7, doc.autoTable.previous.finalY + 10);
    its typescript on angular
    try to add
    overflow: 'linebreak',
    Mahesh Ruparel
    With jsPDF-AutoTable, we can give custom styling to a specific column, but how can I give custom styling to header column of that specific column ? Is it possible ?
    I can use this in node js?
    Josef Unger
    Hej, i got the following question, how can i achieve, that the linebreak in my body does not break in the words but after complete words? So that it is not breaking "Hello World" to "Hell" in one line and the next line "o World"? Thanks for your help guys! :)
    Hi i am using jspdf-autotable in my project. I don't know how to use colspan and rowspan in head section. I tried but it's not working properly for me.
    Hi I am using jspdf-auto table. I have used it to generate table from mysql. The table has dates in first column which are displayed properly in the results in dev tools console but in the generated pdf it shows only years and those are also from 1990 to 2015, though i have data for only last two months. Dates have apparently been converted to years in some weird way. I have tried looking for it but it seems no one ever faced this problem before this.
    Hello all, hopefully, someone can help. I'm using autotable to generate a pdf with a table that has styling applied to it through css. How do I persist that css to the autotable plugin?
    I am new to the angular. Trying to add the header and footer in the Autotable . Anyone help me to add the header image and footer pagenumber. I saw the above email but i dont which code new to apply
    Amina Mahmoud
    hii i'm trying to write arabic data in pdf using jspdf auto table how to do it ?