Specifically, I'm looking for how to implement underlining. I've tried using the text-style crate, however it doesn't render any of the effects it can provide. It provides underline and strikethrough but neither work.
text-style
only provides types and conversions between different type systems. The rendering has to be implemented ingenpdf::render::TextSection
, probably by setting the appropriate flags inprintpdf
.
Speaking of the render module, I cannot figure out how to use it in combination with the higher-level modules provided by genpdf. Any tips?
The main point where you want to use it is the
Element::render
method. Maybe this section in the docs or looking at the implementation ofElement
for e. g.Text
helps?