pdfrb 0.6.0 → 0.7.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +51 -0
- data/RELEASE.md +46 -33
- data/data/pdfrb/afm/Courier-Bold.afm +342 -342
- data/data/pdfrb/afm/Courier-BoldOblique.afm +342 -342
- data/data/pdfrb/afm/Courier-Oblique.afm +342 -342
- data/data/pdfrb/afm/Courier.afm +342 -342
- data/data/pdfrb/afm/Helvetica-Bold.afm +2827 -2827
- data/data/pdfrb/afm/Helvetica-BoldOblique.afm +2827 -2827
- data/data/pdfrb/afm/Helvetica-Oblique.afm +3051 -3051
- data/data/pdfrb/afm/Helvetica.afm +3051 -3051
- data/data/pdfrb/afm/Symbol.afm +213 -213
- data/data/pdfrb/afm/Times-Bold.afm +2588 -2588
- data/data/pdfrb/afm/Times-BoldItalic.afm +2384 -2384
- data/data/pdfrb/afm/Times-Italic.afm +2667 -2667
- data/data/pdfrb/afm/Times-Roman.afm +2419 -2419
- data/data/pdfrb/afm/ZapfDingbats.afm +225 -225
- data/lib/pdfrb/content/canvas.rb +137 -0
- data/lib/pdfrb/content/operators/inline_image.rb +53 -0
- data/lib/pdfrb/content/operators.rb +1 -0
- data/lib/pdfrb/image_loader/png.rb +76 -19
- data/lib/pdfrb/model/type/page_piece_info.rb +58 -0
- data/lib/pdfrb/model/type.rb +3 -0
- data/lib/pdfrb/task/regenerate_appearances.rb +98 -0
- data/lib/pdfrb/task.rb +1 -0
- data/lib/pdfrb/version.rb +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14c300c425848b557b210be218c07de40adbb5188e0c36c15d7d72336395d7c9
|
|
4
|
+
data.tar.gz: 672e663a9efe0991f97aceda226a1fa909ef804d8dd2a94e1cb7f2df4d1cd1c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18c8b3c2c2a15a4fd6dff6f8d58c4403e2e23067f9ad8c655e4a8fe5d43678d748f8d0378eddfc92c9d98f118b710887c0bf95374756088f4885461373d1e30c
|
|
7
|
+
data.tar.gz: cfcbe27e32085ad4a9e753645a8e56571630c230f69aae6f289c7d618bc23bba98b49830be6e01a5317de922f78faba5ec3b1d106436dd75cf600872ab5e75e1
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the pdfrb gem will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.7.0] — 2026-08-08
|
|
6
|
+
|
|
7
|
+
### Added — Release infrastructure
|
|
8
|
+
|
|
9
|
+
* `.github/workflows/rake.yml` — Metanorma CI generic-rake workflow
|
|
10
|
+
for tests on every push, PR, tag, and dispatch.
|
|
11
|
+
* `.github/workflows/release.yml` — Metanorma CI rubygems-release
|
|
12
|
+
workflow driven by `workflow_dispatch` with `next_version` input
|
|
13
|
+
or `repository_dispatch` of type `do-release`.
|
|
14
|
+
* `RELEASE.md` — documents the publish flow and required secrets.
|
|
15
|
+
|
|
16
|
+
### Added — Image subsystem
|
|
17
|
+
|
|
18
|
+
* `Pdfrb::Image::Audit` — read-only metadata extractor (ImageInfo
|
|
19
|
+
struct per image XObject) with `each_image`, `all`, `oversized`
|
|
20
|
+
helpers.
|
|
21
|
+
* `Pdfrb::Image::Downsampler` — pure-Ruby nearest-neighbour for
|
|
22
|
+
FlateDecode-encoded 8-bpc non-palette images. PNG predictor
|
|
23
|
+
round-trip on both decode and encode. JPEG/JP2K skipped (no
|
|
24
|
+
native deps).
|
|
25
|
+
* `Pdfrb::Task::Optimize#downsample_images!(factor:)` — applies the
|
|
26
|
+
downsampler across every image XObject in the document.
|
|
27
|
+
|
|
28
|
+
### Added — Layout bidi
|
|
29
|
+
|
|
30
|
+
* `Pdfrb::Layout::Bidi` — paragraph-level UAX #9 bidi reordering
|
|
31
|
+
(P2-P3 paragraph level, BD1 type classification, I1/I2 implicit
|
|
32
|
+
levels, L2 reverse by level, L4 paired-bracket mirroring).
|
|
33
|
+
* `Pdfrb::Layout::TextLayouter#layout` calls `Bidi.reorder` before
|
|
34
|
+
line breaking, so Hebrew and Arabic render in visual order.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
* Issue #63: `Document::Fonts#add` now extracts the PostScript name
|
|
39
|
+
(name table nameID 6) and uses it in `/BaseFont` (e.g.
|
|
40
|
+
`ABCDEF+MinionPro-Regular` instead of `ABCDEF+EmbeddedFont3132`).
|
|
41
|
+
* Issue #64: `Model::Type::Resources#empty?` handles Hash, Array,
|
|
42
|
+
Cos::Dictionary, and PdfArray values via a single
|
|
43
|
+
`empty_collection?` helper.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
* `Pdfrb::Task::Optimize.dedup_streams!` now actually rewrites
|
|
48
|
+
references to duplicate streams (was a stub).
|
|
49
|
+
* `Pdfrb::Writer#write_xref_stream` emits a free entry for every
|
|
50
|
+
gap in the oid space, so dedup'd oids don't misalign the reader's
|
|
51
|
+
per-oid index.
|
|
52
|
+
* `Pdfrb::Document::Form#flatten!` stamps each field's `/AP /N`
|
|
53
|
+
appearance stream into the page content via the `/Do` operator
|
|
54
|
+
(was a stubbed no-op).
|
|
55
|
+
|
|
5
56
|
## [0.3.0] — 2026-08-02
|
|
6
57
|
|
|
7
58
|
### Added — Semantic PDF diff
|
data/RELEASE.md
CHANGED
|
@@ -1,48 +1,61 @@
|
|
|
1
1
|
# Releasing pdfrb
|
|
2
2
|
|
|
3
|
-
Releases are driven by
|
|
4
|
-
`.github/workflows/release.yml
|
|
5
|
-
for an existing tag).
|
|
3
|
+
Releases are driven by the Metanorma CI reusable workflow at
|
|
4
|
+
`.github/workflows/release.yml`. It supports two triggers:
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
1. **`workflow_dispatch`** with a `next_version` input — manual run
|
|
7
|
+
from the Actions UI. Accepted values: `x.y.z`, `major`, `minor`,
|
|
8
|
+
`patch`, or `pre|rc|etc` to bump to a prerelease.
|
|
9
|
+
2. **`repository_dispatch`** with event type `do-release` — for
|
|
10
|
+
automation triggers from other repos.
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
Both call
|
|
13
|
+
[`metanorma/ci/.github/workflows/rubygems-release.yml@main`](https://github.com/metanorma/ci/blob/main/.github/workflows/rubygems-release.yml),
|
|
14
|
+
which handles version bumping, tag creation, gem build, RubyGems
|
|
15
|
+
publish, and GitHub release creation.
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
git tag v$(ruby -Ilib -e 'require "pdfrb/version"; print Pdfrb::VERSION')
|
|
15
|
-
git push origin v<VERSION>
|
|
16
|
-
```
|
|
17
|
+
## Required secrets
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- Creates a GitHub release with auto-generated notes.
|
|
19
|
+
* `CLARICLE_CI_RUBYGEMS_API_KEY` — RubyGems API key with `push`
|
|
20
|
+
permission on the `pdfrb` gem. Set in repo Settings → Secrets and
|
|
21
|
+
Variables → Actions.
|
|
22
|
+
* `GITHUB_TOKEN` — automatic; used for creating the GitHub release.
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Triggering a release
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
To enable, on RubyGems:
|
|
26
|
+
### From the Actions UI
|
|
28
27
|
|
|
29
|
-
1.
|
|
30
|
-
2.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- Environment: (leave blank)
|
|
28
|
+
1. Go to Actions → `release` workflow.
|
|
29
|
+
2. Click "Run workflow".
|
|
30
|
+
3. Enter the next version (e.g., `0.7.0`, `patch`, `minor`, `major`).
|
|
31
|
+
4. Click "Run workflow".
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
### From the API / CI
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
```sh
|
|
36
|
+
gh workflow run release.yml \
|
|
37
|
+
-f next_version=0.7.0
|
|
38
|
+
```
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
Or via `repository_dispatch` from another repo:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
gh api /repos/claricle/pdfrb/dispatches \
|
|
44
|
+
-f event_type=do-release \
|
|
45
|
+
-f 'client_payload[next_version]=0.7.0'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## CI (test) workflow
|
|
49
|
+
|
|
50
|
+
`.github/workflows/rake.yml` runs the standard Metanorma CI
|
|
51
|
+
generic-rake workflow on every push to `main`/`master`, every tag
|
|
52
|
+
push, every pull request, and via manual `workflow_dispatch`. It
|
|
53
|
+
fires the test matrix across supported Ruby versions.
|
|
42
54
|
|
|
43
55
|
## Pre-release checklist
|
|
44
56
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
* `bundle exec rake` is green locally.
|
|
58
|
+
* `lib/pdfrb/version.rb` matches the intended release (the release
|
|
59
|
+
workflow handles this automatically when given `next_version`).
|
|
60
|
+
* `CHANGELOG.md` has an entry for the new version.
|
|
61
|
+
* No uncommitted changes on `main`.
|