Giter VIP home page Giter VIP logo

asn-qr-code-label-generator's Introduction

Hi, I am Tobias ๐Ÿ‘‹

GitHub: tmaier Twitter: tobias_maier Linkedin: tobias-ludwig-maier Website of Tobias L. Maier

๐Ÿ”ญ Iโ€™m currently working for Accenture at the day and on Librario, my SaaS side project, by night

๐ŸŒฑ Iโ€™m continuosly learning about novell architectural approaches. I play for example with Hotwire (HTML over the wire) for Librario

๐Ÿค” Iโ€™m looking for help with Marketing and Sales for my SaaS side project

๐Ÿ’ฌ Ask me for support with complex architectures or how to design a lightweight architecture

๐Ÿ˜„ Pronouns: He/Him


asn-qr-code-label-generator's People

Contributors

logmull avatar tmaier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asn-qr-code-label-generator's Issues

Rows not properly aligned with L4731 !?

Thanks @tmaier for this surpisingly simple but highly effective method to print ASN labels!
Please don't get offended by the title. I'm quite confident, that you have testet this, but it doesn't work here and I would like to get to the bottom of it ;)

When I startet to print the first labels (on Avery L4731 forms), I encountered a missalignment of the rows.
The first label in a row matched, but each succeeding label lacked a tiny bit, adding up to approx 2-3mm offset on the last label in the row.
The spacing on the vertical rows looked good, though.

At first, I suspected the printer driver (Brother) - and in fact #1 indicates, that there may be issues - but besides some eventually required adjustments of page margins, I could not find any (scaling) problem with the driver.
To rule that component out, I let Chrome print directly to PDF (not via the printer driver!) to be able to verify what is actually generated.
I used the rulers and helper lines of "PDF Xchange Viewer" to exactly measure the placements of the elements in the PDF - and somehwat surprisingly they matched my manual measurements of the printout!

Ok, given that, I now dived into your HTML/CSS code. While I'm certainly no expert in that matter, I tried to follow the formating directions: (Please correct me, if I got something wrong)

  • Each element is 25.4mm wide ( w-[25.4mm])
  • Between each element is a gap of 2.5mm (gap-x-[2.5mm])
  • Calculating the distance from the left edge of the first to the last element would then by 6 * 25.4 + 6 *2.5 = 167.4mm.

All that matches my measurements of the Avery L4731 form! So all good there, obviously.

Now, if I perform the same measurements on the generated PDF, I got this:

  • The distance between the left edge of first and last element is only ~165mm
  • The difference accounts exactly for the offset-skew seen on the printouts.

I would conclude that there is some rendering issue of the page in Chrome!?
I've attached the generated PDF for your reference.
asn_orig-tmaier.pdf

Any thoughts welcome.

Feedback / hint if not working

Hey @tmaier,

Thanks a lot for that work. Did use the code to generate asn labels for paperless import. Had some issues though. Had slight offset of approx 1mm fir the first row that cumulated to 2 mm on the last row. Maybe my brother printer?

If someone has similar problems:

Fixed it by changing py of container to 12.5 and adding a py of 0.4 for LI elements.

Also had problems paperless not being able to read the codes even on 600 ppi and

PAPERLESS_CONSUMER_BARCODE_UPSCALE=2 and
PAPERLESS_CONSUMER_BARCODE_DPI=600.

What solved the problem was calling the googleapi with chld=Q|0.

Now scanning with 300 ppi, upscale 1.5 and works like charm.

Again thanks a lot ๐Ÿ˜‰

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.