Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

PowerPointWriter allows you to insert jpg, gif, bmp, and png images in data markers. Images can be inserted using the image modifier.

Using the Image Modifier

The image modifier can be used to insert images into a data marker. If dimensions are not specified, the image will take on the dimensions of the text box. Dimensions are specified in inches.

To insert an image into a data marker using the image modifier:

  1. Create or open a PowerPointTemplate
  2. Add the image modifier in parenthese to the data marker in which you want to insert the image. For example, change %%=Company.Logo to %%=Company.Logo(image)
  3. If desired, set the 'image' modifier's sizing arguments, such as %%=Company.Logo(image(1,2,2)). The first and second arguments specify the width and height of the image, with dimensions in inches. The first argument tells PowerPointWriter how to scale the image:

Value

Meaning

1

The image will always be the width and height specified regardless of its natural size.

2

The image will always be enlarged or shrunk to fit within the bounds specified by width and height but it will keep its natural aspect ratio.

3

The image will be scaled down to within the bounds specified by width and height but it will keep its natural aspect ratio.

If you are using a database as a data source, the column that corresponds to the data marker containing the image must be of the type BLOB("Image" in SQL Server). If the data source is an array of objects, the value that corresponds to the data marker containing the image should be a simple byte array.

Sample code

Inserting an Image from a byte array C#
Inserting an Image from a byte array VB
  • No labels