Loads an image from a file.




Image.SetFile FilePath



Name Type Description
FilePath String The path to the graphic file.




Loads an image from a file.

The file can be any of the following types: JPEG, GIF, TIFF, BMP, PNG, EXIF, WMF or EMF.

Different images within the file can be accessed using the Frame property. Different portions of the image can be selected using the Selection property.




Here, we open a TIFF file using the Image object. After we've opened the file, we add the image to our document and then save the PDF.

Set theDoc = Server.CreateObject("ABCpdf11.Doc")
Set theImg = Server.CreateObject("ABCpdf11.Image")
theImg.SetFile "c:\mypics\mypic.tif"
theDoc.Rect.Inset 20, 20
theDoc.AddImageObject theImg, False
theDoc.Save "c:\mypdfs\imagesetfile.pdf"