Adds an image to the current page.

 

   

Syntax
 

[C#]
virtual int AddImage(XImage image)
virtual int AddImage(string path)
virtual int AddImage(byte[] data)
virtual int AddImage(string path, int page)
virtual int AddImage(byte[] data, int page)
virtual int AddImage(int id)
virtual int AddImage(System.Drawing.Bitmap bm)
virtual int AddImage(Doc doc, int page)
virtual int AddImage(Doc doc, int page, XRect src)

[Visual Basic]
Function AddImage(ByVal image As XImage) As Integer
Function AddImage(ByVal path As String) As Integer
Function AddImage(ByVal data() As Byte) As Integer
Function AddImage(ByVal path As String, page As Integer) As Integer
Function AddImage(ByVal data() As Byte, page As Integer) As Integer
Function AddImage(ByVal id As Integer) As Integer
Function AddImage(ByVal bm As System.Drawing.Bitmap) As Integer
Function AddImage(ByVal doc As Doc, page As Integer) As Integer
Function AddImage(ByVal doc As Doc, page As Integer, src As XRect) As Integer

Throws Exceptions may throw Exception()

 

   

Params
 
Name Description
image

An XImage containing the image to be added to the page.

path

A file path, URL or html string to be added to the page.

data

The raw JPEG data to be added to the page.

id

An existing image object ID to be copied to the page again.

bm

A .NET Bitmap to be added to the page.

doc

A PDF document page to be added to the page.

page

The page of the document to be added.

src

The source area of the document page to be added.

return The ID of the newly added Image Object.

 

   

Notes
 

Adds an image to the current page returning the ID of the newly added object.

This method attempts to make a sensible decision as to which of the following methods to call dependent on the content of the ImageSpec.

This function is provided for backwards compatibility purposes. You should call the appropriate method directly rather than working via this method.

 

   

Example
 

None.