The code below shows how to create the QR-Code only.

import ch.codeblock.qrinvoice.OutputFormat;
import ch.codeblock.qrinvoice.QrInvoiceCodeCreator;
import ch.codeblock.qrinvoice.model.QrInvoice;
import ch.codeblock.qrinvoice.model.builder.QrInvoiceBuilder;

// ..

final QrInvoice qrInvoice = // create using QrInvoiceBuilder;

final QrCode qrCode = QrInvoiceCodeCreator

// the resulting byte array contains the Swiss QR Code as PNG
// please note that the size (pixels) varies
final byte[] qrCodeImage = qrCode.getData();

// meta data for the chosen OutputFormat for convenience
final String mimeType = qrCode.getOutputFormat().getMimeType();
final String fileExtension = qrCode.getOutputFormat().getFileExtension();
Swiss QR Code