{
  "id": 21151673,
  "title": "QR Code Generator: Why Half My Printed Tickets Refuse to Scan",
  "url": "https://urgent.news/2026/11/22/qr-code-generator-why-half-my-printed-tickets-refuse-to-scan",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-22T01:50:54.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/meng_meng_56f17e28e55f140/qr-code-generator-why-half-my-printed-tickets-refuse-to-scan-2739"
  },
  "original_language": "en",
  "account": "In August, a reporter printed 250 tickets for a company offsite event, each containing a QR code that linked to a check-in form. However, upon arriving at the event, roughly one-third of the tickets failed to scan when attendees attempted to use their phone cameras. The issue turned out to be with how the QR codes were generated, not the print shop. The reporter discovered that there are several ways a printed QR code can fail to scan, and outlined the three main causes and solutions.\n\nThe first cause is the quiet zone, which is a margin of white space required around the QR code for scanners to properly detect it. If this margin is cropped or missing, the scanner will not be able to locate the code. The reporter initially set the border parameter to 0 to save ink, but this resulted in the codes failing to scan. To fix this issue, the border parameter should be set to 4, which ensures a four-module white margin around the code.\n\nThe second cause of scanning failures is when the URL within the QR code exceeds the maximum capacity that the code can accommodate. When the reporter added tracking parameters to the URL for marketing purposes, it caused the code to exceed its capacity. To resolve this issue, the reporter shortened the campaign parameters and returned to a lower error correction level (M instead of H). Additionally, a denser code with a larger grid size can help the scanner resolve the code more easily.\n\nThe third cause of QR code scanning failures is when the colors of the code are inverted. Most QR code scanners expect dark modules on a light background, and inverted codes are not recognized by most decoders. The reporter discovered that the poster version of the QR code, which came back as white modules on a navy blue background, failed to scan on any device they tried. To prevent this issue, the reporter used dark modules on a light background and, if necessary, placed a white card behind the code to ensure proper recognition.\n\nTo avoid these scanning issues, the reporter recommends the following steps before printing QR codes:\n\n1. Ensure the quiet zone is intact by using border=4 or -m 4 in the command line version.\n2. Verify that the URL within the QR code is within the acceptable capacity limit for the chosen error correction level.\n3. Use dark modules on a light background for maximum scanner compatibility, and add a white card behind the code if necessary to compensate for inverted colors.\n\nBy following these guidelines and performing a quick physical test with one proof ticket, the reporter was able to avoid the 11pm panic and ensure that the printed tickets would scan successfully at the offsite event.",
  "summary": "Last month I printed 250 tickets for a company offsite. Each ticket carried a QR code pointing at our check-in form. On the morning of the event, roughly a third of them refused to scan. The phone camera would focus, hesitate, and give up. No error message, nothing. The codes looked perfect on my screen, so I blamed the print shop. Wrong call. The problem was in how I generated them, and it took…",
  "key_points": [
    "Reporter printed 250 tickets with QR codes for event",
    "Initial border parameter set to 0, causing scanning failures",
    "Fixed by setting border parameter to 4 for quiet zone"
  ],
  "editors_take": "Prioritizing ink savings or marketing data density over technical specifications creates functional failures that turn simple printed assets into inaccessible barriers for event attendees.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}