Fix for Issue #1430: API to set custom first-line baseline Y in ColumnText#1477
Merged
andreasrosdal merged 5 commits intomasterfrom Feb 16, 2026
Merged
Fix for Issue #1430: API to set custom first-line baseline Y in ColumnText#1477andreasrosdal merged 5 commits intomasterfrom
andreasrosdal merged 5 commits intomasterfrom
Conversation
…positioning Co-authored-by: andreasrosdal <259156774+andreasrosdal@users.noreply.github.com>
Co-authored-by: andreasrosdal <259156774+andreasrosdal@users.noreply.github.com>
Co-authored-by: andreasrosdal <259156774+andreasrosdal@users.noreply.github.com>
Copilot stopped work on behalf of
andreasrosdal due to an error
February 16, 2026 11:11
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fix for Issue #1430: API to set custom first-line baseline Y in ColumnText
Plan:
customFirstLineBaselineYto store custom first line baselinesetFirstLineBaselineY(float baselineY)to set custom baselinego()method to use custom baseline when set (instead of yLine - leading)getFirstLineBaselineY()to retrieve custom baselineclearFirstLineBaselineY()to reset to default behaviorImplementation Summary:
This PR addresses issue #1430 by adding a new API to ColumnText that allows users to explicitly set the baseline Y position for the first line without needing to manually calculate yLine from the desired baseline and leading.
New API Methods:
setFirstLineBaselineY(float baselineY)- Sets custom baseline Y for the first linegetFirstLineBaselineY()- Gets the custom baseline Y (or NaN if not set)clearFirstLineBaselineY()- Clears the custom settingKey Features:
Changes Made:
customFirstLineBaselineYfield and three new methodsTest Results:
✅ All 10 new tests passing (8 + 2)
✅ All existing ColumnText tests passing (13 total)
✅ Code review: No issues found
✅ Security scan: No vulnerabilities detected
✅ Generated sample PDFs demonstrating the solution
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.