Description
Adds a Background Image to the EvenOddTemplate object and returns a BackgroundImage object.
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 Dim MyDocTemplate Set MyDocument = Server.CreateObject( "DynamicPDF.Document" ) Set MyDocTemplate = MyDocument.SetEvenOddTemplate() MyDocTemplate.AddPageNumberingLabel "Page %%CP%%", 350, 40, 120, 30 ' Background Image in the Template for Even Pages Dim MyEvenGroup Set MyEvenGroup = MyDocTemplate.EvenElements Dim MyBackGroundImage ' Create a background image Set MyBackgroundImage = MyEvenGroup.AddBackgroundImage( Server.MapPath( "Images/DynamicPDF.gif" ) ) ' Place the image with in the page margins MyBackgroundImage.UseMargins = True MyDocument.AddPage() MyDocument.AddPage() MyDocument.AddPage() ' Draw the PDF MyDocument.DrawToWeb Set MyDocument = Nothing %>
|
See Also
EvenOddTemplate Object