# PDF417 HUB3 in Rust **pdf417-hub3-rs** is a 2D barcode generator of PDF417 HUB3 written in Rust and based on [rxing - cRustacean Crossing](https://github.com/rxing-core/rxing). The barcode format / specification is defined [here](https://www.hub.hr/sites/default/files/inline-files/2DBK_EUR_Uputa_1.pdf). ```rust // data required for the barcode payment let data = PaymentOrder::new( "EUR".into(), // currency Decimal::from(10 * 100), // total amount in cents Sender::new( "JOHN SMITH".into(), // name, surname "SOMEWHERE OVER THE RAINBOW".into(), // address "KRIŽEVCI".into(), // city ), Receiver::new( "UNKNOWN ENTITY".into(), // name, surname "TRG SV. FLORIJANA 16".into(), // address "48260 KRIŽEVCI".into(), // city "HR000000000000000000".into(), // IBAN "HR00".into(), // model ), "0001".into(), // check/call number "OTHR".into(), // type "Some reason for the payment".into(), // description ); let barcode = generate(data).unwrap(); // save it to multiple formats let _ = save("barcode.pdf", &barcode); let _ = save("barcode.svg", &barcode); let _ = save("barcode.png", &barcode); ``` ## Alternative implementations - [pdf417-generator](https://github.com/pkoretic/pdf417-generator) for JavaScript/Node.js - [php-pdf417-hub3](https://github.com/leongrdic/php-pdf417-hub3) for PHP 8.1+ - [pdf417-py](https://github.com/ihabunek/pdf417-py) for Python 3 - [golang-pdf417](https://github.com/ruudk/golang-pdf417) for Go