Skip to content

Commit dba858a

Browse files
authored
docs(readme): announce v1.9.0 "navigable" and add the v1.8->v1.9 migration guide (#254)
- README "Release status" now names v1.9.0 (codename "navigable") as Latest stable, and the "What's new" section covers in-document navigation, the native TOC / page references / bookmarks, multi-section documents, the per-page-margin / bleed / row-layout additions, inline chips / SVG / emoji, and render-to-images. Install snippets stay at 1.8.0 (the release tooling flips them at cut time). - Add docs/roadmaps/migration-v1-8-to-v1-9.md — additive-only upgrade guide with a per-area TL;DR table, the one negative-margin behaviour note, the 2.0-bound shim deprecations, and the upgrade snippet. - Index the v1.8->v1.9 and the previously unlisted v1.7->v1.8 guides in docs/README.md.
1 parent 259e49c commit dba858a

3 files changed

Lines changed: 97 additions & 14 deletions

File tree

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</p>
2020

2121
> **Release status** &mdash;
22-
> 🟢 **Latest stable**: [v1.8.0](https://github.com/DemchaAV/GraphCompose/releases/tag/v1.8.0) &mdash; codenamed **"illustrative"**: native vector charts, SVG &amp; gradient graphics, free-form clipping, and a leaner engine artifact. **[What's new in v1.8 &darr;](#whats-new-in-v18)**
22+
> 🟢 **Latest stable**: [v1.9.0](https://github.com/DemchaAV/GraphCompose/releases/tag/v1.9.0) &mdash; codenamed **"navigable"**: in-document navigation (anchors, internal links, a clickable TOC, page references &amp; bookmarks), multi-section documents, and inline chips / SVG icons / colour emoji. **[What's new in v1.9 &darr;](#whats-new-in-v19)**
2323
2424
> &nbsp;·&nbsp; 🟡 **In develop**: next cycle — open (see [CHANGELOG](./CHANGELOG.md))
2525
> &nbsp;·&nbsp; See [API stability policy](./docs/api-stability.md) for tier definitions.
@@ -51,22 +51,19 @@
5151

5252
Sits between **iText** (low-level page primitives) and **JasperReports** (XML-template-driven layout): a Java DSL describes the document semantically, the engine renders.
5353

54-
## What's new in v1.8
54+
## What's new in v1.9
5555

56-
The **"illustrative"** release &mdash; the engine gains a vector-graphics dimension.
56+
The **"navigable"** release &mdash; a rendered PDF becomes a document you can move through.
5757

58-
<p align="center">
59-
<img src="./assets/readme/chart-showcase.png" alt="GraphCompose native vector charts" width="720"/>
60-
</p>
61-
62-
- **Native vector charts** &mdash; bar / line / pie, inline sparklines, and `MONOTONE` / `SMOOTH` line interpolation, drawn as native PDF Béziers (no rasterization): `section.chart(ChartSpec.line()&hellip;, style)`.
63-
- **SVG path &amp; icon import** &mdash; `SvgIcon.parse(svg)` turns SVG into native vector geometry; recolour per use and place with `addSvgIcon(icon, width, align)`.
64-
- **Gradients &amp; free-form clipping** &mdash; linear / radial `DocumentPaint` fills and arbitrary `ShapeOutline.Path` clip regions.
65-
- **Block-level alignment** &mdash; `addAligned(HorizontalAlign.CENTER, node)` centres or right-aligns any fixed node without a wrapper container.
66-
- **`keepTogether()` pagination** &mdash; keep a section from splitting across a page break.
67-
- **Leaner publication** &mdash; the bundled Google fonts moved to the independently-versioned `graph-compose-fonts` artifact, so the engine jar dropped from ~20&nbsp;MB to ~2&nbsp;MB. Pure-text / standard-14 documents need nothing extra; add `graph-compose-fonts` (or `graph-compose-bundle`) to keep the bundled families &mdash; see the [migration note](./docs/migration/v1.8.0-fonts.md).
58+
- **In-document navigation** &mdash; named `anchor(...)` targets and internal `link(...)` jumps emitted as native PDF `GoTo` actions: clickable cross-references, `[text](#heading)`-style links, and bidirectional footnotes (`DocumentLinkTarget` unifies internal and external links).
59+
- **Native table of contents &amp; page references** &mdash; `addTableOfContents(toc -> toc.entry(label, anchor))` builds a clickable TOC with dot leaders and auto-resolved page numbers; `addPageReference(anchor)` prints a native "see page N" cross-reference; `DocumentSession.pageIndex()` resolves any anchor to its page.
60+
- **Bookmarks &amp; viewer preferences** &mdash; `section.bookmark(...)` makes any section or container a PDF outline (bookmark-panel) target, and `chrome().viewerPreferences(...)` opens the reader on the outline panel, a chosen page layout, or the doc title in the window.
61+
- **Multi-section documents** &mdash; `GraphCompose.documents()` concatenates independently authored sections &mdash; each with its own page size, margins, and footer numbering &mdash; into one PDF, with anchors, links, and the outline resolving across section boundaries.
62+
- **Richer row &amp; page layout** &mdash; `row.columns(auto(), weight(1), fixed(80))`, main-axis `flexSpacer()` / `arrangement(...)`, cross-axis `verticalAlign(...)`, per-page `pageMargins(...)`, and full-bleed `bleed(...)`.
63+
- **Inline chips, SVG icons &amp; colour emoji** &mdash; text on a rounded highlight chip, a parsed `SvgIcon` on the text baseline, and `RichText.emoji(":star:", size)` colour emoji via the new independently-versioned `graph-compose-emoji` module.
64+
- **Render straight to images** &mdash; `DocumentSession` renders directly to `BufferedImage`s with no PDF round-trip; plus page-number offset / restart / style and round / dotted line caps.
6865

69-
Core document APIs stay source- and binary-compatible with v1.7 (`ConfigLoader` is the one removal). Full notes in [`CHANGELOG.md`](./CHANGELOG.md).
66+
Core document APIs stay source- and binary-compatible with v1.8 &mdash; v1.9 is purely additive (two cover-letter / CV shim types are newly `@Deprecated` for 2.0). Full notes in [`CHANGELOG.md`](./CHANGELOG.md).
7067

7168
## Installation
7269

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ back here.
5454

5555
### Roadmaps & migrations
5656
- **[roadmaps/v1.6-roadmap.md](roadmaps/v1.6-roadmap.md)** — current development roadmap.
57+
- **[roadmaps/migration-v1-8-to-v1-9.md](roadmaps/migration-v1-8-to-v1-9.md)** — upgrade guide for v1.8 → v1.9.
58+
- **[roadmaps/migration-v1-7-to-v1-8.md](roadmaps/migration-v1-7-to-v1-8.md)** — upgrade guide for v1.7 → v1.8.
5759
- **[roadmaps/migration-v1-6-to-v1-7.md](roadmaps/migration-v1-6-to-v1-7.md)** — upgrade guide for v1.6 → v1.7.
5860
- **[roadmaps/migration-v1-5-to-v1-6.md](roadmaps/migration-v1-5-to-v1-6.md)** — upgrade guide for v1.5 → v1.6.
5961
- **[roadmaps/migration-v1-4-to-v1-5.md](roadmaps/migration-v1-4-to-v1-5.md)** — upgrade guide for v1.4 → v1.5.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Migration: v1.8 → v1.9
2+
3+
v1.9 — codenamed **"navigable"** — is **additive only**. Every public
4+
type, method, and behaviour from v1.8 is unchanged: bump the dependency
5+
to `1.9.0` and rebuild with **no source changes required**. Adding public
6+
API is what turns the open cycle into a minor release.
7+
8+
The theme of the release is **in-document navigation** — a rendered PDF
9+
stops being a flat sequence of pages and becomes a document you can move
10+
through: named anchors, internal links, a native clickable table of
11+
contents, "see page N" cross-references, and a bookmark outline, all
12+
emitted as native PDF `GoTo` actions and resolved in a single authoring
13+
pass.
14+
15+
If your application targets v1.8 today, there is nothing to do but
16+
upgrade. The rest of this guide is a tour of what you can now reach for.
17+
18+
## TL;DR
19+
20+
Everything below is `@since 1.9.0` and purely additive — no v1.8 API is
21+
replaced or removed.
22+
23+
| Area | v1.9 addition | Reach for it when |
24+
| --- | --- | --- |
25+
| **In-PDF navigation** | `anchor(...)` targets + internal `link(...)`; sealed `DocumentLinkTarget` (`InternalLinkTarget` / `ExternalLinkTarget`) | clickable cross-references and `[text](#heading)`-style jumps emitted as native PDF `GoTo` actions |
26+
| **Table of contents** | `addTableOfContents(toc -> toc.entry(label, anchor))` + `TocBuilder` / `DocumentLeader` | a native clickable TOC with dot leaders and auto-resolved page numbers |
27+
| **Page references** | `addPageReference(anchor)` + `PageReferenceNode`; `DocumentSession.pageIndex()``PageIndex` / `PageReference` | a "see page N" cross-reference, or resolving any anchor to its page from code |
28+
| **Bookmarks & viewer prefs** | container `bookmark(DocumentBookmarkOptions)`; `chrome().viewerPreferences(...)` + `DocumentViewerPreferences` / `DocumentPageMode` / `DocumentPageLayout` | a PDF outline (bookmark panel), and controlling how a reader opens the document |
29+
| **Multi-section documents** | `GraphCompose.documents()` + `MultiSectionDocumentBuilder` / `MultiSectionDocument` | concatenating independently authored sections (own page size / margins / numbering) into one PDF, with links resolving across sections |
30+
| **Per-page margins & bleed** | `pageMargins(List<PageMarginRule>)`; `bleed(...)` + `DocumentBleed` / `DocumentEdge` | mixing a full-bleed cover with book-margin body pages, or running content to the trimmed page edge |
31+
| **Row layout** | `row.columns(auto() / weight() / fixed())` + `DocumentRowColumn`; `flexSpacer()` / `pushRight()` / `arrangement(...)` + `RowArrangement`; `verticalAlign(...)` + `RowVerticalAlign` | column tracks, main-axis justify (push a badge flush right), and cross-axis seating within a row |
32+
| **Inline chips / SVG / emoji** | inline highlight chips, inline `SvgIcon` runs, `RichText.emoji(":star:", size)` via the new `graph-compose-emoji` module | a code/badge chip, an icon on the text baseline, or colour emoji by shortcode |
33+
| **Page numbering** | `DocumentPageNumbering` / `DocumentPageNumberStyle` | page-number offset / restart / numeral style in headers and footers |
34+
| **Lines** | `LineBuilder.fill()`; `LineBuilder.lineCap(DocumentLineCap)` | a line that stretches to its slot (dot leaders), and round / square caps or dotted strokes |
35+
| **Render to images** | render a `DocumentSession` straight to `BufferedImage` | a raster preview / thumbnail with no PDF round-trip |
36+
37+
Runnable code for each lives in the
38+
[examples gallery](../../examples/README.md); the exact public-API list
39+
is in [`CHANGELOG.md`](../../CHANGELOG.md) under **v1.9.0**.
40+
41+
## One behaviour to know about
42+
43+
- **A negative page margin is now rejected; a negative bottom *content*
44+
margin is honoured.** A negative `margin(...)` on the page fails fast at
45+
construction instead of silently mis-laying-out the page, while an
46+
intentional negative bottom margin on a block now pulls the following
47+
content up as written. This only affects code that passed a negative
48+
*page* margin — pass a non-negative one.
49+
50+
## Things that did NOT break
51+
52+
- Every entry point on `GraphCompose`, the full `DocumentSession`
53+
authoring lifecycle (`compose`, `pageFlow`, add, `buildPdf`, export,
54+
close, `layoutGraph`, `layoutSnapshot`).
55+
- `DocumentDsl`, `BusinessTheme`, `DocumentPalette`, and the invoice /
56+
proposal / CV / cover-letter / weekly-schedule template entry points
57+
(V1 and V2).
58+
- The fixed-layout and semantic backend SPIs and every public render
59+
handler.
60+
- Layout snapshots and visual-regression baselines — navigation markers
61+
are non-visual, so a document that adds no anchors, links, or bookmarks
62+
renders byte-for-byte as before.
63+
64+
> **Deprecations (informational, not breaking).**
65+
> `templates.api.CoverLetterTemplate` and the `cv.v2.components`
66+
> `HeadlineRenderer` / `ContactRenderer` / `BannerRenderer` shims are now
67+
> `@Deprecated(forRemoval = true, since = "1.9.0")` — superseded by the
68+
> generic `DocumentTemplate` seam and the `cv.v2.widgets` widgets
69+
> respectively. They still compile and behave exactly as before in 1.x;
70+
> they are slated for removal in 2.0. See
71+
> [`docs/api-stability.md`](../api-stability.md) §3 for the ledger.
72+
73+
## Upgrading
74+
75+
```xml
76+
<dependency>
77+
<groupId>io.github.demchaav</groupId>
78+
<artifactId>graph-compose</artifactId>
79+
<version>1.9.0</version>
80+
</dependency>
81+
```
82+
83+
That is the entire migration. Pull in any of the primitives above as you
84+
need them.

0 commit comments

Comments
 (0)