|
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.
using var doc = new Doc();
string text = "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.";
text = text + "\r\n" + text + "\r\n" + text + "\r\n";
doc.Rect.Magnify(0.5, 0.5);
doc.Rect.Position(151, 198);
doc.FrameRect();
doc.Transform.Rotate(45, 302, 396);
doc.FrameRect();
doc.FontSize = 24;
doc.AddText(text);
doc.Save(Server.MapPath("doctransform.pdf"));
Using doc As 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 + vbCr & vbLf + theText + vbCr & vbLf + theText + vbCr & vbLf
doc.Rect.Magnify(0.5, 0.5)
doc.Rect.Position(151, 198)
doc.FrameRect()
doc.Transform.Rotate(45, 302, 396)
doc.FrameRect()
doc.FontSize = 24
doc.AddText(theText)
doc.Save(Server.MapPath("doctransform.pdf"))
End Using

doctransform.pdf
Also see example code in: ABCpdf Landscape
Example, Doc AddGrid
Function, Doc AddXObject
Function, XTransform Invert
Function, XTransform Magnify
Function, XTransform Reset
Function, XTransform Rotate
Function, XTransform Skew Function,
XTransform
Translate Function, XTransform
AngleUnit Property, FontObject
Widths Property, Page
GetBitmap Function, Page
MakeFormXObject Function, Page
Rotation Property,
XpsImportOperation Import Function.
|
|
|