Coder Social home page Coder Social logo

badger's Introduction

badger

A webapp and server for assigning a directory of jpeg images to a list of names and titles of people, and rendering badges generated by combining the chosen images, database personal details and background images. Can also generate a "Who's who" page to stick up on the wall at your event.

Allows interactive cropping and brightening of the images.

Status

Works for me, will need significant expertise with sqlite databases and image handling since documentation is just this short file, the code needs refactoring and much of the UI is missing.

the problem with printing

I'm using SnapSVG to generate some badges including background image, titles, a cropped ID photo with brightness control, etc. Code (and it is a bit hacky, needs refactoring and has no test coverage) is at http://github.com/dickon/badger/. I'm happy with the way the badges look on screen, as this screen capture shows:

Nice screenshot

If I print a page of these badges in Chrome Version 63.0.3239.132 on macOS 10.12.6 then the foreground image and caption text comes out pretty low resolution and looks terrible. Here's a screen capture from a PDF viewer, showing the effect I see when I make an inkjet print:

Partially blurry PDF capture

So, last time I needed to print badges I zoomed in and used the "Full Page Screen Capture" Chrome extension and got a nice high resolution image, then loaded that up into Affinity Designer to set the size appropriately and printed from there. However, I'm now getting rendering bugs with the full page screen capture extension.

Firefox Quantum 58.0.1 also produces blurry PDFs, similar to Chrome.

Safari does not render the SVG as I wanted; the brightness filtering responds differently. However the PDF looks similar to the screen version, and specifically does not have the blurriness.

So far I have no good solution. Options:

  1. get my SVG to look good in Safari and try printing from there.
  2. use headless chrome and puppeteer to save an image
  3. wkhtml2pdf
  4. run SnapSVG in nodejs to produce a single SVG, then load the SVG into a vector editor and print from there.

development

To run server in dev cycle:

nodemon --watch app.ts --exec 'ts-node'  app.ts

badger's People

Watchers

 avatar  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.