jsPDF

Externs for jsPDF
https://github.com/okawa-h/jsPDF-extern/

To install, run:

haxelib install jsPDF 0.2.0 

See using Haxelib in Haxelib documentation for more information.

README.md

jsPDF externs for Haxe

Overview

This is extern for Haxe. Client-side JavaScript PDF generation for everyone.

Original JavaScript code: https://github.com/MrRio/jsPDF

Original API document: https://rawgit.com/MrRio/jsPDF/master/docs/index.html

Example

This is extern. Load jsPDF in HTML.

Haxe code:

import jsPDF.JsPDF;

class Main {
    static function main() {

        var doc = new JsPDF();

        doc.text('Hello world!', 10, 10);
        doc.save('a4.pdf');

    }
}

Generate JavaScript code:

// Generated by Haxe 3.4.7
(function () { "use strict";
var Main = function() { };
Main.main = function() {
    var doc = new jsPDF();
    doc.text("Hello world!",10,10);
    doc.save("a4.pdf");
};
Main.main();
})();

Anything Else

This extern has basic functions but is incomplete. We look forward to a gentle pull request.

thanks.

References

Original JavaScript code: https://github.com/MrRio/jsPDF

Original API document: https://rawgit.com/MrRio/jsPDF/master/docs/index.html

Contributors
okawa-h
Version
0.2.0
Published
6 years ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub