Loads an image from a file.

 

   

Syntax
 

Image.SetFile FilePath

 

   

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

 

   

Notes
 

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.

 

   

Example
 

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("ABCpdf10.Doc")
Set theImg = Server.CreateObject("ABCpdf10.Image")
theImg.SetFile "c:\mypics\mypic.tif"
theDoc.Rect.Inset 20, 20
theDoc.AddImageObject theImg, False
theDoc.Save "c:\mypdfs\imagesetfile.pdf"


imagesetfile.pdf