Description

Adds a Background Image to the AreaGroup object and returns a BackgroundImage object.

Syntax

Public Function AddBackgroundImage( _
   ByVal Image As Variant _
) As BackgroundImage

Parameters

Image
The file path of the Image file.

Return Type

A BackgroundImage object.

Remarks

This class can be used to place an image on the page that will be stretched to the dimensions of the page. If an image will be used more than once, please see the Image Reuse topic.

Example

[ASP - VBScript] 

<% 
    ' Create a PDF Document 
    Dim MyDocument  
    Set MyDocument = Server.CreateObject( "DynamicPDF.Document" )   
    ' Create a Page and add it to the document 
    Dim MyPage  
    Set MyPage = MyDocument.AddPage() 
    Dim MyAreaGroup 
    Set MyAreaGroup = MyPage.AddAreaGroup( 400, 300 ) 
    ' Create a background image 
    Dim MyBackgroundImage  
    Set MyBackgroundImage = MyAreaGroup.AddBackgroundImage( Server.MapPath( "Images/DynamicPDF.gif" ) ) 
    ' Place the image with in the page margins  
    MyBackgroundImage.UseMargins = True 
    ' Draw the PDF 
    MyDocument.DrawToWeb 
    Set MyPage = Nothing 
    Set MyDocument = Nothing 
%> 
 

See Also

AreaGroup Object