fschutt / printpdf

A fully-featured PDF library for Rust, WASM-ready
https://fschutt.github.io/printpdf/
MIT License
829 stars 98 forks source link

Rotate text #177

Closed agavrel closed 7 months ago

agavrel commented 7 months ago

Hi,

Could you let me know if there is a way to rotate text?

Best regards,

fschutt commented 7 months ago

Use set_text_matrix inside of a layer.begin_text_section() / layer.end_text_section() block:

https://github.com/fschutt/printpdf/blob/fbc7d691f988b0d295570bee072de932f4cabda2/examples/font.rs#L50

agavrel commented 7 months ago

hello yes I had it figured out this weekend;) thanks!