Rotate text rotate the page
Hi everybody,
i've got some issue with rotating some text.
What i want to achieve:
I generate a pdf in which i display some pictures. Sometimes the pictures have a copyright and i want to display the copyright at the right of the image rotating 90 counter clock wise.
So the result is something like that:
To achieve this i try draw_text and text_box, like that:
pdf.draw_text picturable.picture.copyright, at: [indent + image_width[:width].mm + config.schedule.image.copyright.size, next_line_height.pt - image_height[:height].mm], rotate: 90, size: config.schedule.image.copyright.size
pdf.text_box(picturable.picture.copyright, :at => [indent + image_width[:width].mm, next_line_height.pt - image_height[:height].mm], :width => image_width[:width].mm, :rotate => 90, size: config.schedule.image.copyright.size, :overflow => :shrink_to_fit)
Some times it's working great, but i have a strange behaviour, some time it's rotate the page :
We have a system of line to check the available place in the document and before displaying the image if the image take more place than the remaining place we start a new page.
Does some of you have any idea of how i can correct the 'bug' or explain me a way to achieve my purpose without rotating my page?