html: honour text color alpha (transparent -> invisible text) - #287
Merged
Merged
Conversation
… ExtGState) The bridge built text fill colors from the RGB channels only, so `color: transparent` rendered opaque black and `rgba(..., a)` rendered fully opaque. OCR text layers (transparent spans over a page scan) came out as black text on top of the image. Text runs with a < 255 now render in their own q/Q scope: a == 0 uses text rendering mode 3 (invisible but selectable/extractable), 0 < a < 255 loads a fill-alpha ExtGState. Opaque runs are unchanged. The glyph-run inline background pass gets the same ExtGState treatment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GPPrSydyY9syEfGC74Kch2
fschutt
pushed a commit
to fschutt/pdfocr
that referenced
this pull request
Sep 30, 2026
…tches printpdf comes from fschutt/printpdf#287 (text honours color alpha) as a git dependency; azul-css from fschutt/azul#480 (invalid selectors drop their rule) via [patch.crates-io]. azul-core/-layout stay on 0.0.16: azul master's azul-layout does not build with printpdf's feature set. Cargo.lock is committed so the exact upstream commits are pinned, and CI builds with --locked. patches/ is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GPPrSydyY9syEfGC74Kch2
…kept beside this one) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WyGP18BMbfHvnTRYqNVjbP
fschutt
added a commit
that referenced
this pull request
Oct 2, 2026
…r alpha) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WyGP18BMbfHvnTRYqNVjbP
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.
The bridge built text fill colors from the RGB channels only, so
color: transparentrendered opaque black andrgba(..., a)rendered fully opaque. OCR text layers (transparent spans over a page scan) came out as black text on top of the image.Text runs with a < 255 now render in their own q/Q scope: a == 0 uses text rendering mode 3 (invisible but selectable/extractable), 0 < a < 255 loads a fill-alpha ExtGState. Opaque runs are unchanged. The glyph-run inline background pass gets the same ExtGState treatment.
Claude-Session: https://claude.ai/code/session_01GPPrSydyY9syEfGC74Kch2