fschutt / printpdf

An easy-to-use library for writing PDF in Rust
https://docs.rs/printpdf/
MIT License
777 stars 95 forks source link

Rotate text #177

Closed agavrel closed 2 months ago

agavrel commented 2 months ago

Hi,

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

Best regards,

fschutt commented 2 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 2 months ago

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