Classic Invoice

The ClassicInvoice preset — letterhead header band, TOTAL DUE hero strip, BILL TO / FROM columns, and a dedicated Summary table after the line items.

1 page

Use this template

Maven
<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>
Gradle
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.invoice.presets.ClassicInvoice

Data model com.demcha.compose.document.templates.data.invoice.InvoiceDocumentSpec

Compose this preset
import com.demcha.compose.document.templates.invoice.presets.ClassicInvoice;

DocumentTemplate<InvoiceDocumentSpec> template = ClassicInvoice.create();

try (DocumentSession document = GraphCompose.document(Path.of("invoice-classic-v2.pdf")).create()) {
    template.compose(document, data);   // data: InvoiceDocumentSpec
    document.buildPdf();
}
Run the example
./mvnw -f examples/pom.xml exec:java -Dexec.mainClass=com.demcha.examples.templates.invoice.v2.ClassicInvoiceV2Example

Writes examples/target/generated-pdfs/templates/invoice/invoice-classic-v2.pdf