|
Here we add a number of chunks of text rotated at different
angles about the middle of the document.
using var doc = new Doc();
doc.FontSize = 48;
doc.TextStyle.Indent = 48;
for (int i = 1; i <= 8; i++) {
int angle = i * 45;
doc.Pos.String = "302 396";
doc.Transform.Reset();
doc.Transform.Rotate(angle, 302, 396);
doc.AddText($"Rotated {angle}");
}
doc.Save(Server.MapPath("rotate.pdf"));
Using doc As New Doc()
doc.FontSize = 48
doc.TextStyle.Indent = 48
Dim i As Integer = 1
While i <= 8
Dim theAngle As Integer = i * 45
doc.Pos.String = "302 396"
doc.Transform.Reset()
doc.Transform.Rotate(theAngle, 302, 396)
doc.AddText($"Rotated {theAngle}")
System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1)
End While
doc.Save(Server.MapPath("rotate.pdf"))
End Using

rotate.pdf
Also see example code in: ABCpdf Landscape
Example, Doc AddGrid
Function, Doc
AddXObject Function, Doc Transform Property,
XTransform Invert Function, XTransform Reset Function, XTransform
AngleUnit Property, FontObject
Widths Property, Page
Rotation Property,
XpsImportOperation Import Function.
|
|
|