Modern Receipt
A settled transfer confirmation on the layered receipt family — hero amount with a status chip, payer/beneficiary panel, dotted-leader detail rows, a status timeline, and a footer pinned to the page bottom with a verification QR code.
1 page
Use this template
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose-templates</artifactId>
<version>2.4.1</version>
</dependency>
implementation 'io.github.demchaav:graph-compose:2.4.1'
implementation 'io.github.demchaav:graph-compose-templates:2.4.1'
Java 17 or newer
Preset com.demcha.compose.document.templates.receipt.presets.ModernReceipt
Data model com.demcha.compose.document.templates.data.receipt.ReceiptDocumentSpec
import com.demcha.compose.document.templates.receipt.presets.ModernReceipt;
DocumentTemplate<ReceiptDocumentSpec> template = ModernReceipt.create();
try (DocumentSession document = GraphCompose.document(Path.of("receipt-modern.pdf")).create()) {
template.compose(document, data); // data: ReceiptDocumentSpec
document.buildPdf();
}
./mvnw -f examples/pom.xml exec:java -Dexec.mainClass=com.demcha.examples.templates.receipt.ModernReceiptExample
Writes examples/target/generated-pdfs/templates/receipt/receipt-modern.pdf