Hm, rotating the text. I think you have a couple options here.
First, you could generate HTML and rotate the text using CSS. I'm not sure how this would work. For instance, if I create three lines of text and then rotate them, do they appear as line 1/line 2/line 3 with each line rotated, or do they appear as line 3/line 2/line 1 with the entire block rotated? You'll need the latter. It would seem reasonable that if all three lines were inside a single <div> and the div had the CSS that rotated the text, they might rotate as a group, but I doubt it. You need something that rotates the div itself (the CSS for rotating text could be placed on a div and it would be inherited by the text nodes, but that's not the same thing).
HTML might be a pain and might not be implemented properly by all browsers anyway (mostly looking at IE/Edge). If you could count on SVG support, you could ensure it works because SVG is all about rotating shapes... Here's some CSS that rotates the text when given HTML such as:
Code:
<span class="rotate">Some string</span>
Code:
.rotate {
position: absolute;
transform-origin: 0 1em 0; /* */
-webkit-transform: rotate(90deg); /* Safari */
-moz-transform: rotate(90deg); /* Firefox */
-ms-transform: rotate(90deg); /* IE */
-o-transform: rotate(90deg); /* Opera */
/* filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* Internet Explorer */
}
Your second option would be XSL:FO. This is an extension of XSL that provides for producing output in PDF. XSL:FO should provide control over just about anything you can imagine! Here's a
cheatsheet of the basic elements available, and here's a longer
tutorial-style approach to learning XSL:FO. Obviously, Google can likely find many other resources.
[size=-2]Why does this forum put extra blank lines inside and at the end of my CODE blocks??[/size]