Skip to content

Is it possible to change the color in stamp_text? #107

Discussion options

You must be logged in to vote

Unfortunately not natively, no. While changing text colours is something that would be (relatively) easy to implement---modulo subtleties with colour spaces---implementing even "basic" styling is a lot less straightforward than it sounds. Rich text layout in PDF requires the PDF creation software to juggle multiple font resources, deal with paragraph layout, text shaping, etc. The general problem is a lot harder than in .docx/.odt/.html/.epub/....

Right now, pyHanko's appearance generation code only performs very primitive text layout: no word wrapping, use one single font, no frills. On the other hand, I did implement OTF font support with shaping performed through HarfBuzz. That said, t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Vishwamithra37
Comment options

Answer selected by Vishwamithra37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants