-
Notifications
You must be signed in to change notification settings - Fork 5
Comparing changes
Open a pull request
base repository: coregx/gxpdf
base: v0.3.0
head repository: coregx/gxpdf
compare: v0.4.0
- 9 commits
- 17 files changed
- 1 contributor
Commits on Feb 20, 2026
-
feat: expand paper sizes to 35+ with map-based architecture
Add 27 new page size constants to both domain and creator layers: - Extended ISO A series: A0, A1, A2, A6, A7, A8 - Extended ISO B series: B0, B1, B2, B3, B6 - ISO C/Envelope: C4, C5, C6, DL - North American: Executive, HalfLetter - ANSI Engineering: ANSIC, ANSID, ANSIE - Photo: Photo4x6, Photo5x7, Photo8x10 - Book Publishing: Digest, USTradeBook - Presentation (unique): Slide16x9, Slide4x3 - US Envelope: Envelope10 - JIS B (Japanese): JISB4, JISB5 Domain layer uses single pageSizeMap as source of truth (no switch duplication). Creator layer iota values mirror domain 1:1 via direct cast — validated by compile-time structural test. Tests cover all 35+ sizes, A-series halving invariant, JIS vs ISO B-series distinction, presentation aspect ratios, and iota order guard.
Configuration menu - View commit details
-
Copy full SHA for 49ca529 - Browse repository at this point
Copy the full SHA 49ca529View commit details -
feat: add custom page dimensions API (NewPageWithDimensions)
Add document.AddPageWithRect for domain-level custom page creation. Add creator.NewPageWithDimensions(widthPt, heightPt) for ergonomic custom dimensions at the creator layer. Both methods initialize all page fields identically to the existing AddPage/NewPageWithSize methods. Negative and zero dimensions are rejected with descriptive errors. Unit conversion helpers (InchesToPoints, MMToPoints, CMToPoints) and their constants are now also exported from the creator package, delegating to the domain layer implementations to avoid duplication. Tests cover: correct dimensions, validation errors, page count increment, mixed use with standard sizes, PDF write round-trip, default margins, and content area calculation.
Configuration menu - View commit details
-
Copy full SHA for 8faef4d - Browse repository at this point
Copy the full SHA 8faef4dView commit details -
feat: add text rotation support (AddTextRotated)
Add Rotation float64 field to creator.TextOperation and writer.TextOp structs. Rotation is in degrees, counter-clockwise, around the text origin point (X, Y). New creator.Page methods: AddTextRotated(text, x, y, font, size, rotation) error AddTextColorRotated(text, x, y, font, size, color, rotation) error Content stream generation now uses the Tm (text matrix) PDF operator when Rotation != 0, computing cos/sin from the degree value. Zero rotation continues to use the Td (MoveTextPosition) operator, preserving backward compatibility. convertTextOps propagates the Rotation field from creator to writer. Tests cover: 0/90/45/negative degree values, color and validation, Tm vs Td operator selection, matrix math correctness, end-to-end PDF write, multiple rotations on one page, and AddText regression guard.
Configuration menu - View commit details
-
Copy full SHA for d31f191 - Browse repository at this point
Copy the full SHA d31f191View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc11f2b - Browse repository at this point
Copy the full SHA fc11f2bView commit details -
feat: add Orientation type with Landscape/Portrait support for NewPag…
…eWithSize NewPageWithSize now accepts an optional orientation parameter — the industry-standard approach used by PDFKit, jsPDF, gofpdf, TCPDF, and others. Uses swapped-MediaBox (93% industry consensus), no /Rotate.
Configuration menu - View commit details
-
Copy full SHA for eb2aa9f - Browse repository at this point
Copy the full SHA eb2aa9fView commit details -
fix: address code review findings before merge
- Fix stale godoc: ToRectangle() referenced SetRotation for landscape, now points to NewPageWithSize with Landscape option - Fix misleading comment: 'compile-time check' → 'runtime check' - Add reverse conversion functions to creator layer (PointsToInches, PointsToMM, PointsToCM) for API symmetry with forward conversions - Add domain-layer test for AddPageWithRect (was only tested indirectly) - Fix rotation tests: now assert actual content stream matrix bytes instead of testing Go math library
Configuration menu - View commit details
-
Copy full SHA for c66a698 - Browse repository at this point
Copy the full SHA c66a698View commit details -
docs: update public documentation for v0.4.0 features
- CHANGELOG: add v0.4.0 section (35+ page sizes, custom dimensions, landscape orientation, text rotation) - README: add new features to Key Features section, update version plan - ROADMAP: add v0.4.0 'Creator API' section, shift encryption/signatures to v0.5.0, update feature status table and backlog
Configuration menu - View commit details
-
Copy full SHA for 43b714b - Browse repository at this point
Copy the full SHA 43b714bView commit details
Commits on Feb 21, 2026
-
feat: normalize rotation angles to [0,360) and improve godoc
- Add normalizeAngle() helper for consistent angle representation - Apply normalization in AddTextColorRotated and AddTextCustomFontColorRotated - Negative angles accepted: -90 becomes 270, -45 becomes 315 - Fractional angles (22.5°, 33.3°) fully supported - Document CCW-positive convention per ISO 32000 §8.3 - Clarify Slide16x9/Slide4x3 are already landscape-oriented - Note Orientation behavior with presentation sizes - Add 16 normalization test cases + equivalence tests
Configuration menu - View commit details
-
Copy full SHA for a05403e - Browse repository at this point
Copy the full SHA a05403eView commit details -
Merge pull request #44 from coregx/feat/v0.4.0-creator-api
feat: v0.4.0 Creator API — page sizes, custom dimensions, landscape, text rotation
Configuration menu - View commit details
-
Copy full SHA for 1e84281 - Browse repository at this point
Copy the full SHA 1e84281View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.3.0...v0.4.0