Release v1.0.7
🎉 PDF Generator v1.0.7 - Pagination Fix Release
Release Date: January 16, 2026
🐛 Bug Fixes
Critical: Table Pagination Issue Fixed
- Fixed: Table rows being lost when content spans multiple pages with NORMAL margins
- Fixed: Bottom margin not being respected on the first page when tables overflow
- Fixed: Missing rows when table doesn't fit on the current page and needs to move entirely to the next page
Technical Details
The pagination engine has been completely rewritten to handle edge cases where:
- Table header + first data row exceeds remaining space on current page
- Content before the table leaves insufficient room for any table rows
- NORMAL (72pt) margins created boundary calculation issues
🔧 Improvements
Enhanced Table Splitting Logic
- Improved
splitTable()function with cleaner, more robust logic - Added empty placeholder chunk mechanism to signal page breaks
- Better handling of header-only chunks that need to move to next page
- Proper preservation of all data rows during pagination
Code Quality
- Simplified layout engine's table chunk processing
- Added comprehensive documentation for the
splitTable()function - Removed redundant conditional checks
- Better separation of concerns between splitting and layout
📦 Installation
Gradle (Kotlin DSL)
dependencies {
implementation("io.github.alims-repo:pdf-generator:1.0.7")
}Gradle (Groovy)
dependencies {
implementation 'io.github.alims-repo:pdf-generator:1.0.7'
}📋 Migration Notes
This is a backward-compatible release. No changes required to existing code.
If you were experiencing:
- Missing table rows in multi-page PDFs
- Tables rendering incorrectly with NORMAL margins
- Bottom content being cut off on page 1
Simply update to v1.0.7 and the issues will be resolved automatically.
🧪 Testing
This release has been tested with:
- Various margin configurations (NONE, NARROW, NORMAL, WIDE, MODERATE)
- Tables with 5-50+ rows
- Mixed content (text, boxes, tables, QR codes) before tables
- Complex invoice layouts with multiple sections
📄 Example: Invoice Generation
pdf {
pageSize(PageSize.A4)
margins(PageMargins.NORMAL)
// Header content...
title("INVOICE")
spacer(20f)
// Table now correctly paginates
table {
header("Description", "Qty", "Rate", "Total")
row("Service 1", "10", "$50", "$500")
row("Service 2", "5", "$75", "$375")
// ... more rows
}
// Footer content appears correctly on last page
spacer(20f)
text("Thank you for your business!")
}.saveToFile(file)🙏 Acknowledgments
Thanks to all users who reported the pagination issues. Your feedback helps make PDF Generator better!
📝 Full Changelog
Fixed
- Table pagination losing rows with NORMAL margins
- First page not respecting bottom margin
- Edge case where header + first row exceeds available space
Improved
- Table splitting algorithm completely rewritten
- Layout engine chunk processing simplified
- Better error handling for edge cases
Full Changelog: v1.0.5-beta...v1.0.6-beta