Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/readme/repository_showcase_render.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,42 @@ public static Path generate() throws Exception {
return outputFile;
}

/**
* Renders page 1's banner as a standalone, full-bleed hero. The dark
* violet field is painted as the canonical {@code pageBackground}, so it
* fills the whole landscape page — margins and corners included — and the
* rasterised image carries no white frame, only the banner itself. This is
* the source of the repository README hero
* ({@code assets/readme/repository_showcase_render.png}, produced by
* {@link com.demcha.examples.support.PdfPageRasterizer}); re-render it after a
* version bump — the banner reads {@link #VERSION} / {@link #CODENAME}, so
* the hero stays current with one rebuild.
*
* @return the generated single-page banner PDF path
* @throws Exception when rendering or icon IO fails
*/
public static Path generateBanner() throws Exception {
Path outputFile = ExampleOutputPaths.prepare("flagships", "engine-banner.pdf");
try (DocumentSession document = GraphCompose.document(outputFile)
.pageSize(DocumentPageSize.A4.landscape())
.pageBackground(HERO_BG)
.margin(16, 16, 16, 16)
.create()) {
document.metadata(DocumentMetadata.builder()
.title("GraphCompose v" + VERSION + " — " + CODENAME)
.author("GraphCompose")
.subject("GraphCompose banner — the engine's own brand hero")
.producer("GraphCompose (PDFBox 3.0)")
.build());
document.pageFlow()
.name("EngineBanner")
.addSection("Banner", EngineDeckExample::banner)
.build();
document.buildPdf();
}
return outputFile;
}

/**
* Composes the four deck pages onto a session — shared by {@link #generate()}
* and the layout snapshot test, so the test guards the very layout we ship.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
import java.util.Objects;

/**
* Single-page cinematic engine showcase used as the
* {@code assets/readme/repository_showcase_render.png} source. NOT a
* business document, NOT a CV — a brand promo page that demonstrates
* the visual register the engine can hit when an author cares about
* presentation as much as data:
* Single-page cinematic engine showcase — a brand promo page that was
* the original {@code repository_showcase_render.png} README hero, now
* superseded by {@link EngineDeckExample#generateBanner()}. NOT a
* business document, NOT a CV — it demonstrates the visual register the
* engine can hit when an author cares about presentation as much as
* data:
*
* <ul>
* <li><b>Top navy band</b> — full-width branded marquee (canonical
Expand All @@ -47,9 +48,10 @@
* filesystem path assumptions.</p>
*
* <p>Output:
* {@code examples/target/generated-pdfs/flagships/engine-showcase.pdf}
* — page 1 is rasterised by {@link com.demcha.examples.support.PdfPageRasterizer}
* into {@code assets/readme/repository_showcase_render.png}.</p>
* {@code examples/target/generated-pdfs/flagships/engine-showcase.pdf}.
* The README hero is now sourced from
* {@link EngineDeckExample#generateBanner()} (rasterised by
* {@link com.demcha.examples.support.PdfPageRasterizer}).</p>
*
* @author Artem Demchyshyn
* @since 1.6.6
Expand Down