Giter VIP home page Giter VIP logo

labels's Introduction

Labels

Generates a PDF document from a CSV file to print sticker labels.

It is, surprisingly, a very tricky/annoying thing to do. There is software out there for doing this, but you have to pay yearly plans just to generate a few pages. Sometimes they do not have the type of stickers you need, or the correct number of rows or columns. Furthermore, after all of that, some printers do not handle margins correctly or lie about it.

This simple script takes a CSV file and uses Prawn. This allows you to set all those parameters manually to get them right. With a little bit of trial and error the correct PDF document is ready for printing.

๐Ÿ–จ Take a look to the PDF sample

How to use

  1. Install gems with bundle install

  2. Drop CSV data inside data.csv. Format: Name, Company, Address line 1, Address line 2, Country

  3. Tweak params inside the bin/generate file to match your paper/printer

  4. Run bin/generate to generate the PDF

Tips for printing

  • Page default is A4, but always choose A4 borderless when printing

  • Always scale to 100% so each sticker gets correctly aligned to its spot

  • Measure page size, margins and gutters and tweak parameters inside bin/generate

  • If you run into layout problems there is a debug flag available.

labels's People

Contributors

marcelinollano avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rabinniroula

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.