npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

boleto-pdf

v0.4.0

Published

boleto pdf generetor

Downloads

258

Readme

boleto-pdf

npm (scoped) Travis Coveralls Greenkeeper badge

Um simples gerador de pdf de boletos de bancos brasileros.

Esse projeto tem como objetivo apenas gerar o pdf do boleto, ele não cria linhas digitáveis, nem cria o número do código de barras e etc. Para isso recomendo o uso do boleto-br.

Suporte:

| Barco | Suporte | |--------------|----------------------| | Bradesco | :white_check_mark: | | OMNI | :white_check_mark: | | Caixa | Em breve | | Santander | Help Wanted | | Itaú | Help Wanted | | Outros | Help Wanted |

Instalação

Este projeto usa node e npm. Verifique em seu sistema se já estão instalados, corretamente.

$ npm install boleto-pdf --save

Uso

const fs = require('fs')
const {bradesco} = require('boleto-pdf')

const boleto = {
  barcodeData: '23797726700000009997506091900000120800542910',
  digitableLine: '23797.50603 91900.000125 08005.429108 7 72670000000999',
  paymentPlace:
    'Pagável preferencialmente na rede Bradesco ou Bradesco Expresso.',
  beneficiary: 'UNICRED FLORIANÓPOLIS - CNPJ: 074.064.502/0001-12',
  beneficiaryAddress:
    'Rua Tenete Silveira, 315 - Centro - Florianópolis - SC  - CEP 88010-301',
  instructions:
    'Após o vencimento cobrar multa de 2,00% , mais juros ao mes de 1,00%.',
  agency: '7506',
  agencyDigit: '0',
  account: '54291',
  accountDigit: '1',
  expirationDay: new Date(2017, 7, 30), // 30/08/2017
  documentDate: new Date(2017, 7, 18), // 18/08/2017
  processingDate: new Date(2017, 7, 18), // 18/08/2017
  card: '09',
  documentNumber: '42493',
  formatedOurNumber: '09/19000001208-0',
  formatedValue: 'R$ 9,90',
  documentType: 'DS',
  accept: 'N',
  currencyType: 'Real (R$)',
  amount: ' ',
  valueOf: ' ',
  descountValue: ' ',
  otherDiscounts: ' ',
  feeValue: ' ',
  outherFees: ' ',
  chargeValue: ' ',
  payer: {
    name: 'Anita Albuquerque',
    registerNumber: '221.412.772-05',
    street: 'Rua Maria Gertrudes Coelho',
    number: '827',
    complement: ' ',
    district: 'Estrada Nova',
    city: 'Divinópolis',
    state: 'MG',
    postalCode: '35500-700'
  },
  guarantor: {
    name: 'ACME Telecomunicações Ltda',
    registerNumber: '074.064.502/0001-12',
    street: 'Servidão',
    number: '439',
    district: 'Estrada Nova',
    complement: ' ',
    city: 'Jaraguá do Sul',
    state: 'SC',
    postalCode: '89254-375'
  }
}

bradesco(boleto).then( data => {
  fs.writeFile('boleto.pdf',data,'binary', err =>{
    if(err){
      console.log(err)
      return
    }

    console.log('file saved')
  })
}).catch(err =>{
  console.log(err)
})

Contribuindo

Veja o contributing file.

Licença

MIT License © Rafael Castro