The following code creates a PDF document and adds some text and
a rectangle rotated at 45 degrees anti-clockwise around the middle
of the document.
[C#]
Doc theDoc = new Doc();
string theText;
theText = "Gallia est omnis divisa in partes tres, quarum unam incolunt
Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra
Galli appellantur. Hi omnes lingua, institutis, legibus inter se
differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona
et Sequana dividit.";
theText = theText + "\r\n" + theText + "\r\n" + theText + "\r\n";
theDoc.Rect.Magnify(0.5, 0.5);
theDoc.Rect.Position(151, 198);
theDoc.FrameRect();
theDoc.Transform.Rotate(45, 302, 396);
theDoc.FrameRect();
theDoc.FontSize = 24;
theDoc.AddText(theText);
theDoc.Save(Server.MapPath("doctransform.pdf"));
theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc = New Doc()
Dim theText As String
theText = "Gallia est omnis divisa in partes tres, quarum unam
incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae,
nostra Galli appellantur. Hi omnes lingua, institutis, legibus inter
se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona
et Sequana dividit."
theText = theText + vbCrLf + theText + vbCrLf + theText + vbCrLf
theDoc.Rect.Magnify(0.5, 0.5)
theDoc.Rect.Position(151, 198)
theDoc.FrameRect()
theDoc.Transform.Rotate(45, 302, 396)
theDoc.FrameRect()
theDoc.FontSize = 24
theDoc.AddText(theText)
theDoc.Save(Server.MapPath("doctransform.pdf"))
theDoc.Clear()

doctransform.pdf
|
|
|