|
Here we add two chunks of text. The default text is added in black
and the magnified text is drawn in red. We specify the middle of
the document as the anchor point which means that all scaling is
relative to the middle of the document. Our horizontal scale factor
is larger than our text has been stretched horizontally somewhat.
[C#]
Doc theDoc = new Doc();
theDoc.Rect.Inset(200, 200);
theDoc.FontSize = 48;
theDoc.AddText("Normal");
theDoc.FrameRect();
theDoc.Rect.Move(0, -100);
theDoc.Color.String = "255 0 0";
theDoc.Transform.Magnify(2, 1.5, 302, 396);
theDoc.AddText("Magnified");
theDoc.FrameRect();
theDoc.Save(Server.MapPath("transformmagnify.pdf"));
theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Rect.Inset(200, 200)
theDoc.FontSize = 48
theDoc.AddText("Normal")
theDoc.FrameRect()
theDoc.Rect.Move(0, -100)
theDoc.Color.String = "255 0 0"
theDoc.Transform.Magnify(2, 1.5, 302, 396)
theDoc.AddText("Magnified")
theDoc.FrameRect()
theDoc.Save(Server.MapPath("transformmagnify.pdf"))
theDoc.Clear()

transformmagnify.pdf
|
|
|