Scales about a locked anchor point.




XTransform.Magnify ScaleX, ScaleY, AnchorX, AnchorY



Name Type Description
ScaleX Double The amount of horizontal scaling to apply.
ScaleY Double The amount of vertical scaling to apply.
AnchorX Double The horizontal coordinate about which the stretch should be applied.
AnchorY Double The vertical coordinate about which the stretch should be applied.




This method stretches the world space about a locked anchor point. Different degrees of horizontal and vertical stretch can be used.

Another way of looking at this kind of transform is as a zoom. The anchor point is the location you're zooming in on and the scale factors indicate the level of zoom.




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, so our text has been stretched horizontally somewhat.

Set theDoc = Server.CreateObject("ABCpdf13.Doc")
theDoc.Rect.Inset 200, 200
theDoc.FontSize = 48
theDoc.AddText "Normal"
theDoc.Rect.Move 0, -100
theDoc.Color = "255 0 0" ' red
theDoc.Transform.Magnify 2, 1.5, 302, 396
theDoc.AddText "Magnified"
theDoc.Save "c:\mypdfs\transformmagnify.pdf"