puzzle / prawn-markup

Parse simple HTML markup to include in Prawn PDFs
MIT License
65 stars 16 forks source link

is there a way to determine the width of the markup? #3

Closed villacerc closed 4 years ago

villacerc commented 5 years ago

i am planning to align my markup to the right of the pdf and i use prawn's bounding_box to do it but bounding_box requires the width parameter to be set

codez commented 5 years ago

As the markup may contain arbitrary content (lists, tables, images, ..), I guess it would be impossible to determine the resulting width. Why don't you give the bounding box full width (bounds.width)?