Events

Event ID card & badge generator

An attendee ID badge with photo, role and barcode — printed by the thousand for conferences.

Print attendee ID badges for a whole conference without designing each one. Pass the event, attendee name, role, company and badge ID, and PDFgen returns a clean ID card PDF with initials and a barcode-style strip.

Loop over your registrant list to generate every badge in one run, all from a single reusable template.

Generate a Event ID Card PDF via the API

POST your data to /api/v1/generate and get a PDF back. Copy-paste an example, swap in your API key, and loop over a list to render thousands — one event id card per record.

curl -X POST https://pdfgen.com/api/v1/generate \
-H "Authorization: Bearer pdfg_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"html": "<div style=\"padding:32px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:#111827;\">\n <div style=\"max-width:300px;margin:0 auto;border-radius:16px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.12);border:1px solid #e5e7eb;\">\n <div style=\"background:#4f46e5;color:#fff;padding:20px;text-align:center;\">\n <p style=\"font-size:12px;letter-spacing:2px;margin:0;opacity:.9;\">{{event}}</p>\n <p style=\"font-size:11px;margin:4px 0 0;opacity:.7;\">{{formatDate date}}</p>\n </div>\n <div style=\"background:#fff;padding:24px;text-align:center;\">\n <div style=\"width:96px;height:96px;border-radius:50%;background:#eef2ff;color:#4f46e5;font-size:34px;font-weight:800;line-height:96px;margin:0 auto 14px;\">{{initials}}</div>\n <h1 style=\"font-size:20px;font-weight:800;margin:0;\">{{name}}</h1>\n <p style=\"font-size:13px;color:#4f46e5;font-weight:600;margin:4px 0 0;\">{{role}}</p>\n <p style=\"font-size:12px;color:#6b7280;margin:2px 0 0;\">{{company}}</p>\n <div style=\"margin-top:18px;display:inline-block;background:#111827;color:#fff;font-size:11px;letter-spacing:2px;padding:6px 14px;border-radius:999px;\">ID {{badgeId}}</div>\n <div style=\"margin-top:18px;height:36px;background:repeating-linear-gradient(90deg,#111827 0 2px,#fff 2px 5px);border-radius:4px;\"></div>\n </div>\n </div>\n</div>",
"engine": "handlebars",
"format": "A5",
"data": {
"event": "DevWorld Conf 2026",
"date": "2026-09-18",
"initials": "SR",
"name": "Sam Reyes",
"role": "Speaker",
"company": "Orbit SaaS",
"badgeId": "00482"
}
}' --output event-id-card.pdf

Working in another language? Follow a full guide for your stack:

What you can build

  • Generating badges for every registered conference attendee
  • Producing staff / speaker / exhibitor ID variants
  • On-site badge printing from a check-in system
  • Re-issuing a replacement badge on demand

Frequently asked questions

Can I batch-generate badges for all attendees?
Yes — loop your attendee list and call the API once per badge. Each returns a print-ready PDF.
Can I show different roles (speaker, staff, attendee)?
Yes — pass the role in your data and it renders on the badge; you can also branch the template styling by role.
Can I add a real scannable barcode?
The template includes a barcode-style graphic. For a scannable code, insert a QR/barcode image URL or SVG into the template and pass the value per attendee.

Related templates

Ship your event id card PDF endpoint today

Generate this template with AI, tweak it to match your brand, then render at scale with a single API call — no headless browsers to babysit.