PdfAddImageFromFile Method

See Also     Examples     Applies To

Adds an image from file to the native pdf created by the PdfNewPdfEx() function.

Syntax

object.PdfAddImageFromFile (sImagePath)

The PdfAddImageFromFile syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
sImagePath Required. String. The full image file path.

Returns

Long. Returns an incremental Pdf image number if success, else 0. This pdf image number can be used with the PdfDrawImage() function.

Remarks

This function can only be used with the native PDF created by the PdfNewPdfEx() function.
Supported formats are BMP, DIB, RLE, ICO, EMF, WMF, GIF, ANIMATED GIF, JPEG, JPG, JPE, JFIF, PNG, TIFF, MULTIPAGE TIFF (takes only the first page), PNM, PPM, PBM, PFM, PGM, RPPM, RPGM, RPBM, PCX.
Redistributing the optional gdimgplug.dll library you will also be able to read XPM, XBM, WBMP, TGA, SGI, RAW, PICT, Sun RAS, PSD, MNG, Kodak PhotoCD files, KOALA files, JP2, J2K, JNG, JBIG, IFF, HDR, Raw Fax G3, EXR, DDS and Dr. Halo files.

Category

PDF Functions





© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.