-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathModuleFirstFileExample.java
More file actions
52 lines (42 loc) · 2.1 KB
/
Copy pathModuleFirstFileExample.java
File metadata and controls
52 lines (42 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.demcha.examples.flagships;
import com.demcha.compose.GraphCompose;
import com.demcha.compose.document.api.DocumentPageSize;
import com.demcha.compose.document.api.DocumentSession;
import com.demcha.examples.support.ExampleOutputPaths;
import java.nio.file.Path;
/**
* Minimal canonical authoring example for developers who are building their
* own document instead of using a built-in template.
*/
public final class ModuleFirstFileExample {
private ModuleFirstFileExample() {
}
public static Path generate() throws Exception {
Path outputFile = ExampleOutputPaths.prepare("flagships", "module-first-profile.pdf");
try (DocumentSession document = GraphCompose.document(outputFile)
.pageSize(DocumentPageSize.A4)
.margin(24, 24, 24, 24)
.create()) {
document.pageFlow()
.name("CandidateProfile")
.spacing(12)
.module("Professional Summary", module -> module.paragraph(
"Backend engineer focused on clean Java APIs, stable document output, "
+ "and reusable template architecture."))
.module("Technical Skills", module -> module.bullets(
"Java 21 and Spring Boot",
"PDF document generation with GraphCompose",
"Layout snapshot testing and render regression checks",
"Modular template design for CV, invoice, and proposal flows"))
.module("Projects", module -> module.rows(
"GraphCompose - canonical engine migration, module-first DSL, and business template cleanup.",
"CVRewriter - profile-aware CV tailoring platform with secure Spring Boot backend and PDF generation."))
.build();
document.buildPdf();
}
return outputFile;
}
public static void main(String[] args) throws Exception {
System.out.println("Generated: " + generate());
}
}