Scanner ActiveX Control

PDFAddImageFromFile

 

Adds image to the PDF file. Before you draw the image, you must add image to the PDF file first.

Public Function PDFAddImageFromFile( _
   ByVal strImageFile As String
) As long

 

Parameter

strImageFile
   the path of image file. It support JPEG, PNG, TIFF files.


Return Value

Return the image ID.

Example

   

Visual Basic Syntax
Scanner1.PDFInitAnnotation
imageId = Scanner1.PDFAddImageFromFile("C:\myfolder\sample.jpg")
If imageId <> -1 Then
   Scanner1.PDFDrawImage 0, imageId, 30000, 10000, 0.1, 0.1
 End If
Scanner1.SaveAllPage2PDF "c:\newpage.pdf", True , 1