TypeScript implementation of PDF417 barcode generator.
- 🚀 Pure TypeScript implementation - no external dependencies
- 🌐 Web standards compliant - works in any modern browser and workers ... maybe
- 📦 Standalone library - easy to integrate into any project
- 🔧 Fully customizable barcode generation
- 📱 Responsive and scalable output
npm install pdf417js
import { PDF417 } from "pdf417js";
// Create a new instance
const pdf417 = new PDF417();
// Generate barcode
const barcode = pdf417.generate("Hello, World!");
// Get barcode as string
console.log(pdf417.toString());
You can customize the barcode generation with the following options:
const pdf417 = new PDF417({
rowHeight: 4, // Height of each row in modules
quietH: 2, // Horizontal quiet zone in modules
quietV: 2, // Vertical quiet zone in modules
});
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run build
ISC