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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ body:
id: gpdf-version
attributes:
label: gpdf Version
placeholder: "v1.0.3"
placeholder: "v1.0.4"
validations:
required: true

Expand Down
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [1.0.4] - 2026-04-07

### Added
- AcroForm flatten support — flatten form fields into static content (#17)

## [1.0.3] - 2026-03-23

### Fixed
- Multi-page table support — tables inside Row/Col now automatically split across pages
- `layoutHorizontal` propagates child overflow to the paginator
Expand All @@ -21,7 +28,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- `pdf.Writer.AddRawPage()`, `PageTreeRef()`: Raw page insertion support
- Merge examples: basic merge, page range extraction, metadata, merge + overlay, issue #11 scenario

## [1.0.0] - 2026-03-20
## [1.0.1] - 2026-03-22

### Added
- RFC 3161 timestamping for digital signatures

## [1.0.0] - 2026-03-22

### Added
- Existing PDF overlay — open, read, and modify existing PDFs
Expand Down Expand Up @@ -107,8 +119,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- Reed-Solomon coefficient order in QR code encoder
- binary.Write return value handling for errcheck lint

[Unreleased]: https://github.com/gpdf-dev/gpdf/compare/v1.0.3...HEAD
[1.0.2]: https://github.com/gpdf-dev/gpdf/compare/v1.0.0...v1.0.3
[Unreleased]: https://github.com/gpdf-dev/gpdf/compare/v1.0.4...HEAD
[1.0.4]: https://github.com/gpdf-dev/gpdf/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/gpdf-dev/gpdf/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/gpdf-dev/gpdf/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/gpdf-dev/gpdf/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/gpdf-dev/gpdf/compare/v0.9.0...v1.0.0
[0.9.0]: https://github.com/gpdf-dev/gpdf/compare/v0.8.0...v0.9.0
[0.8.0]: https://github.com/gpdf-dev/gpdf/compare/v0.5.0...v0.8.0
Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Go Reference](https://pkg.go.dev/badge/github.com/gpdf-dev/gpdf.svg)](https://pkg.go.dev/github.com/gpdf-dev/gpdf)
[![CI](https://github.com/gpdf-dev/gpdf/actions/workflows/check-code.yml/badge.svg)](https://github.com/gpdf-dev/gpdf/actions/workflows/check-code.yml)
![coverage](https://img.shields.io/badge/coverage-86.3%25-green)
![coverage](https://img.shields.io/badge/coverage-86.1%25-green)
[![Go Report Card](https://goreportcard.com/badge/github.com/gpdf-dev/gpdf)](https://goreportcard.com/report/github.com/gpdf-dev/gpdf)
[![Go Version](https://img.shields.io/badge/Go-%3E%3D1.22-blue)](https://go.dev/)
[![Website](https://img.shields.io/badge/Website-gpdf.dev-blue)](https://gpdf.dev/)
Expand Down Expand Up @@ -33,6 +33,7 @@ A pure Go, zero-dependency PDF generation library with a layered architecture an
- **Images** — JPEG and PNG embedding with fit options
- **Absolute positioning** — place elements at exact XY coordinates on the page
- **Existing PDF overlay** — open existing PDFs and add text, images, stamps on top
- **Form flattening** — flatten AcroForm fields into static page content, preserving non-widget annotations
- **PDF merging** — combine multiple PDFs into one with page range selection
- **Document metadata** — title, author, subject, creator
- **Encryption** — AES-256 encryption (ISO 32000-2, Rev 6) with owner/user passwords and permissions
Expand Down Expand Up @@ -499,6 +500,22 @@ doc.EachPage(func(i int, p *template.PageBuilder) {
result, _ := doc.Save()
```

### Form Flattening

Flatten interactive AcroForm fields into static page content. Non-widget annotations (links, comments) are preserved:

```go
// Open a PDF with form fields
doc, err := gpdf.Open(filledFormPDF)

// Flatten all form fields into static content
if err := doc.FlattenForms(); err != nil {
log.Fatal(err)
}

result, _ := doc.Save()
```

### PDF Merging

Combine multiple PDFs into a single document with optional page range selection:
Expand Down Expand Up @@ -796,6 +813,7 @@ doc.Render(f)
| `doc.PageCount()` | Get the number of pages |
| `doc.Overlay(page, fn)` | Add content on top of a specific page |
| `doc.EachPage(fn)` | Apply overlay to every page |
| `doc.FlattenForms()` | Flatten AcroForm fields into static page content |
| `doc.Save()` | Save the modified PDF |
| `gpdf.Merge(sources, opts...)` | Merge multiple PDFs into one |
| `WithMergeMetadata(title, author, producer)` | Set metadata on merged output |
Expand Down
Loading
Loading