Workspace Invoice

The WorkspaceInvoice preset on the structured invoice model — a brand masthead over an accent bar, a half-split issuer and metadata header, two addressed parties on discs, service lines whose marks sit on coloured tiles, and a settlement row above a closing band.

1 page

Use this template

Maven
<dependency>
  <groupId>io.github.demchaav</groupId>
  <artifactId>graph-compose-bundle</artifactId>
  <version>2.4.1</version>
</dependency>
Gradle
implementation 'io.github.demchaav:graph-compose-bundle:2.4.1'

Why the aggregate this document is drawn in a bundled font, and those ship separately from the engine; the aggregate carries them along with the PDF backend and the templates, in one coordinate

Java 17 or newer

Preset com.demcha.compose.document.templates.invoice.presets.WorkspaceInvoice

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

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

DocumentTemplate<StructuredInvoiceData> template = WorkspaceInvoice.create();

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

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