AddImageFromFile
IPDFDocument4 :: Images

See Also
Collapse All

This method adds an image from a file into a PDF document's images collection and returns the index of the added image. Supported image formats: BMP, GIF, JPEG, PNG, TIFF.

Syntax

LONG AddImageFromFile (
BSTR fileName
)
Parameters
fileName
Path to the file containing the image

Return value
Index of the new image. If there is more than one image in a file, then the method returns the index of the most recently added image.

Remarks

The return value is an image identifier in the document's images collection and can be used in GetImageHeight, GetImageResolution, GetImageWidth, TransformImage, ShowImage, DrawImage.

See the ShowImage method for examples.

See Also

Reference