https://github.com/binarskugga/printableqrgenerator
Generates tables of QR codes for automated serial sticker printing. Can be configured with Avery formats provided some mearsurements.
https://github.com/binarskugga/printableqrgenerator
avery bulk code generator pdf pdf-generation printable qr
Last synced: 11 months ago
JSON representation
Generates tables of QR codes for automated serial sticker printing. Can be configured with Avery formats provided some mearsurements.
- Host: GitHub
- URL: https://github.com/binarskugga/printableqrgenerator
- Owner: BinarSkugga
- Created: 2018-11-04T23:28:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-10T22:51:02.000Z (over 7 years ago)
- Last Synced: 2025-06-03T10:01:02.412Z (about 1 year ago)
- Topics: avery, bulk, code, generator, pdf, pdf-generation, printable, qr
- Language: Java
- Size: 471 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# New features
Please let me know via an issue if you want a new feature ! You can even make it yourself and make a pull request ! :)
# Simple use
``` java
public class ExampleQRGenerator extends QRSerialGenerator {
@Override
protected UUID nextValue(UUID previous) {
return UUID.randomUUID();
}
@Override
protected String toLabel(UUID current) {
return "UUID v" + current.version();
}
}
```
``` java
// This example works with the Avery template #5167
QRSerialGenerator generator = new ExampleQRGenerator();
generator.setPageSize(new RectangleReadOnly(8.5f, 11f));
generator.setOutsetMargin(new RectangleReadOnly(5f / 16f, 0.5f));
generator.setInsetMargin(new RectangleReadOnly(5f / 16f, 0));
generator.setStickerSize(new RectangleReadOnly(1.75f, 0.5f));
generator.setLineSize(4);
generator.setBatchSize(800);
generator.setEcc(QrCode.Ecc.LOW);
generator.generate("simple-generator.pdf");
```
> Click on the image to test scan it.

# From a collection
``` java
public class ExampleQRGeneratorCollection extends QRSerialCollectionGenerator {
public ExampleQRGeneratorCollection(List items) {
super(items);
}
@Override
protected String toValue(SimplePojo current) {
return "SIMPLE-" + current.getId().toString();
}
@Override
protected String toLabel(SimplePojo current) {
return current.getName() + " " + current.getLastName().charAt(0) + ".";
}
}
```
``` java
// This example works with the Avery template #5167
List items = Arrays.asList(
new SimplePojo(UUID.randomUUID(), "Charles", "Smith"),
new SimplePojo(UUID.randomUUID(), "Louis-Philippe", "Potvin"),
new SimplePojo(UUID.randomUUID(), "Jonathan", "Métras"),
new SimplePojo(UUID.randomUUID(), "Alexandre", "Marchand"),
new SimplePojo(UUID.randomUUID(), "Frédéric", "Deschênes")
);
QRSerialCollectionGenerator collectionGenerator = new ExampleQRGeneratorCollection(items);
collectionGenerator.setPageSize(new RectangleReadOnly(8.5f, 11f));
collectionGenerator.setOutsetMargin(new RectangleReadOnly(5f / 16f, 0.5f));
collectionGenerator.setInsetMargin(new RectangleReadOnly(5f / 16f, 0));
collectionGenerator.setStickerSize(new RectangleReadOnly(1.75f, 0.5f));
collectionGenerator.setLineSize(4);
collectionGenerator.setLabelFontSize(10);
collectionGenerator.generate("simple-collection-generator.pdf");
```
> Click on the image to test scan it.
