Here we open a TIFF file using the XImage object. We add the entire
image to the document and then just a portion of the image using the
Selection property.
[C#]
XImage theImg = new XImage();
Doc theDoc = new Doc();
theImg.SetFile(Server.MapPath("../mypics/mypic.tif"));
theDoc.Rect.String = theImg.Selection.String;
theDoc.Rect.Magnify(0.5, 0.5);
theDoc.Rect.Position(100, 30);
theDoc.AddImageObject(theImg, false);
theImg.Selection.Inset(100, 200);
theDoc.Rect.String = theImg.Selection.String;
theDoc.Rect.Position(170, 400);
theDoc.AddImageObject(theImg, false);
theImg.Clear();
theDoc.Save(Server.MapPath("imageselect.pdf"));
theDoc.Clear();
[Visual Basic]
Dim theImg As XImage = New XImage()
Dim theDoc As Doc = New Doc()
theImg.SetFile(Server.MapPath("../mypics/mypic.tif"))
theDoc.Rect.String = theImg.Selection.String
theDoc.Rect.Magnify(0.5, 0.5)
theDoc.Rect.Position(100, 30)
theDoc.AddImageObject(theImg, False)
theImg.Selection.Inset(100, 200)
theDoc.Rect.String = theImg.Selection.String
theDoc.Rect.Position(170, 400)
theDoc.AddImageObject(theImg, False)
theImg.Clear()
theDoc.Save(Server.MapPath("imageselect.pdf"))
theDoc.Clear()
imageselect.pdf
|
|
|