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

print-tag

v1.1.1

Published

Simple module to generate PDF tags for print in comercial formats

Downloads

513

Readme

Print tags

NPM version Build Status Coverage Status

Node.js module to generate PDFs in commercial tags formats and ready to print

Installation

npm install --save print-tag

Usage

// See all avaible formats in: https://github.com/albertosouza/print-tag/blob/master/lib/formats.js
var pt = new PrintTicket('pimaco_6187');
// write in test/results/output.pdf , see PDFkit documentation
pt.doc.pipe( fs.createWriteStream('test/results/output.pdf') );
pt.doc.fontSize(6);

pt.makeTickets({
  count: data.length
}, function onSetOneTag(i, marginLeft, marginTop, size, next) {
  // write something in tag area
  pt.doc.text(data[i].name, marginLeft,  marginTop, size);
  // ticket box
  pt.doc.lineWidth(0.1);
  pt.doc.rect(marginLeft, marginTop, size.width, size.height).stroke();
  // run next function
  next();
}, function afterSetAllTags(){
  // end, required for end / finish the PDF file
  pt.doc.end();
});

pt.doc.on('end', function(){
  done();
});

Formats

Please help with more formats in: https://github.com/albertosouza/print-tag/blob/master/lib/formats.js

Avaible:

  • pimaco_6187
  • pimaco_6180
  • pimaco_6081
  • pimaco_a4355

Example:

Page printed with tags in pimaco 6187 format

Authors

  • Alberto Souza: http://albertosouza.net
  • Thiago Anselmo: https://github.com/thiagoanselmo

Contributors

  • Angelo Dias: https://github.com/angelod1as
  • Luiza Avelino: https://github.com/luiza-avelino

License

MIT © Alberto Souza