Git Product home page Git Product logo

Comments (4)

simonbengtsson avatar simonbengtsson commented on September 23, 2024

Sounds strange. I just tried to generate a basic table with meteor and it worked. Could you try to port your example to javascript and see if that works. I haven't had the opportunity to use coffeescript yet...

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 23, 2024

I tried converting your example to javascript now and including it in the meteor hello world example which worked. This means that it must be some kind of loading order issue in your case? I put the jspdf and jspdf-autolayout scripts in the /client/lib folder and had this script executed at the push of a button:

if (Meteor.isClient) {

  Template.hello.events({
    'click button': function () {
      var columns = [
        {
          title: 'ID',
          key: 'id'
        }, {
          title: 'Name',
          key: 'name'
        }, {
          title: 'Country',
          key: 'country'
        }, {
          title: 'IP-address',
          key: 'ip_address'
        }, {
          title: 'Email',
          key: 'email'
        }
      ];

      var data = [
        {
          'id': 1,
          'name': 'Shaw',
          'country': 'Tanzania',
          'ip_address': '92.44.246.31',
          'email': '[email protected]'
        }, {
          'id': 2,
          'name': 'Nelson',
          'country': 'Kazakhstan',
          'ip_address': '112.238.42.121',
          'email': '[email protected]'
        }
      ];

      var doc, uri;
      doc = new jsPDF('p', 'pt');
      doc.autoTable(columns, data);
      uri = doc.output('datauristring');
      console.log("uri ", uri);

    }
  });
}

from jspdf-autotable.

chip avatar chip commented on September 23, 2024

Thanks for your prompt response and it was a really good idea to start over with a clean slate. It allowed me to step back a bit and think about how I was loading the files. I tried your suggestion and was able to get it to work by putting those files under client/compatibility/, so it was my mistake all along.

At any rate, I have created a jspdf package on atmosphere and was considering doing the same for your plugin if I have the time and you're ok with it.

Thanks again for your help. Really nice work on this plugin! 😃

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 23, 2024

Sure! Let me know if you have any other issues or suggestions!

from jspdf-autotable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.