@qrcommunication/gigapdf-lib 0.52.4 → 0.52.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ All notable changes to `@qrcommunication/gigapdf-lib` are documented here.
4
4
  The format follows [Keep a Changelog](https://keepachangelog.com/) and the
5
5
  project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.52.5] - 2026-06-19
8
+
9
+ ### Added
10
+
11
+ - **Arrow line annotations — `addLineAnnotation(page, x1, y1, x2, y2, rgb, lineWidth, endArrow?)`.**
12
+ The new `endArrow` flag draws an open arrowhead at the `(x2,y2)` end and records
13
+ `/LE [/None /OpenArrow]` on the `/Line` annotation, so the arrowhead survives in
14
+ any conforming reader (Adobe Reader, Preview, Chrome) — and stays editable, not
15
+ baked. The `/Rect` is padded around the arrowhead so it is never clipped. Ideal
16
+ for callouts that point at content. Backward compatible: `endArrow` defaults to `false`.
17
+
7
18
  ## [0.52.4] - 2026-06-19
8
19
 
9
20
  ### Added
package/dist/index.cjs CHANGED
@@ -1541,8 +1541,14 @@ var GigaPdfDoc = class {
1541
1541
  addHighlight(page, x0, y0, x1, y1, rgb = 16776960) {
1542
1542
  return this.ex().gp_add_highlight(this.h, page, x0, y0, x1, y1, RGB(rgb)) === 0;
1543
1543
  }
1544
- addLineAnnotation(page, x1, y1, x2, y2, rgb = 0, lineWidth = 1) {
1545
- return this.ex().gp_add_line(this.h, page, x1, y1, x2, y2, RGB(rgb), lineWidth) === 0;
1544
+ /**
1545
+ * Add a `/Line` annotation from `(x1,y1)` to `(x2,y2)`. When `endArrow` is
1546
+ * `true`, an open arrowhead (`/LE [/None /OpenArrow]`) is drawn at the
1547
+ * `(x2,y2)` end — a real, editable annotation in conforming readers, ideal
1548
+ * for callouts that point at content.
1549
+ */
1550
+ addLineAnnotation(page, x1, y1, x2, y2, rgb = 0, lineWidth = 1, endArrow = false) {
1551
+ return this.ex().gp_add_line(this.h, page, x1, y1, x2, y2, RGB(rgb), lineWidth, endArrow ? 1 : 0) === 0;
1546
1552
  }
1547
1553
  addFreeText(page, x0, y0, x1, y1, text, fontSize = 12, rgb = 0) {
1548
1554
  return this.g._withStr(