class HexaPDF::Composer

def formatted_text(data, width: 0, height: 0, style: nil, box_style: nil, **style_properties)

See: #text, HexaPDF::Layout::TextBox, HexaPDF::Layout::TextFragment

valign: :bottom, block: block}])
composer.formatted_text(["Some ", {box: :list, width: 50,
block = lambda {|list| list.text("First item"); list.text("Second item") }
composer.formatted_text(["Some ", {text: "string", style: {font_size: 20}}])
fill_color: 'hp-blue', text: "Example"}])
composer.formatted_text(["Some ", {link: "https://example.com",
composer.formatted_text(["Some ", {text: "string", fill_color: "hp-orange"}])
composer.formatted_text(["Some string"])
#>pdf-composer

Examples:

arguments.
HexaPDF::Layout::TextBox that does the actual work. See that method for details on the
It uses HexaPDF::Document::Layout#formatted_text_box behind the scenes to create the

interspersing with inline boxes.
Draws text like #text but allows parts of the text to be formatted differently and
def formatted_text(data, width: 0, height: 0, style: nil, box_style: nil, **style_properties)
  draw_box(@document.layout.formatted_text_box(data, width: width, height: height, style: style,
                                               box_style: box_style, **style_properties))
end