An open API service indexing awesome lists of open source software.

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.

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.

![Result](https://raw.githubusercontent.com/BinarSkugga/PrintableQRGenerator/master/result.png)

# 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.

![Result Collection](https://raw.githubusercontent.com/BinarSkugga/PrintableQRGenerator/master/result-collection.png)