Coder Social home page Coder Social logo

idcard_generator's Introduction

idcard-generator

使用 nodejs 生成身份证

本工具仅供研究使用,请勿用于违法用途,否则后果自负

使用

const idcardGenerator = require('idcard-generator');
const config = {
    name: '喵喵喵',
    sex: '女',
    nation: '汉',
    year: '3000',
    mon: '2',
    day: '31',
    org: '喵喵县公安局',
    validTerm: '2014.02.31-2019.02.31',
    addr: '云南省昆明市喵喵区汪汪路呱呱小区5栋1806',
    idn: '111111111111111111',
    avatar: './images/avatar.png'
}
idcardGenerator(config).then(e => {
    fs.writeFile('./output.png', e, err => {
        if (err) {
            console.log(err);
        } else {
            console.log('保存成功');
        }
    })
}).catch(err => {
    console.log('idcard-generator:测试失败\n' + err.stack);
});

其他

参考项目:https://github.com/airob0t/idcardgenerator

根据在 https://github.com/airob0t/idcardgenerator 下载的PSD文件,以自己的身份证作为标准,做了一些大的调整,修改了一些字体和布局

idcard_generator's People

Contributors

ice-hazymoon avatar

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.