LassoScript Utility
Basics Browse Detail

[PDF_Image]

Tag Link [PDF_Image] Category PDF
Type Substitution Source Available Yes
Support Preferred Version 7.0
Change Unchanged Data Source Any
Output Type PDF_Image Security Tag
Implementation LJAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0

Description

Casts an image file as an object so it can be placed in a PDF file. Requires either a -File, -URL, or -Raw parameter, as described below. Only images in JPEG, GIF, PNG, and WMF formats may be used.

Syntax

[Var:'Image' = (PDF_Image: -File='/images/image.jpg')]

[Var:'Image' = (PDF_Image: -URL='http://www.example.com/images/image.jpg')]

[Var:'Image' = (PDF_Image: -File='/images/image.jpg', -Height=Integer, -Width=Integer)]

[Var:'Image' = (PDF_Image: -File='/images/image.jpg', -Rotate=Integer)]

Parameters

Optional Parameters
-File Specifies the local path to an image file. Required if the -URL or -Raw parameters are not used.
-URL Specifies a URL to an image file. Required if the -File or -Raw parameters are not used.
-Raw Inputs a raw string of bits representing the image. Required if the -URL or -File parameters are not used.
-Height Scales the image to the specified height. Requires a decimal value which is the desired image height in points. Optional.
-Width Scales the image to the specified width. Requires a decimal value which is the desired image width in points. Optional.
-Proportional Keyword parameter specifying that all scaling should preserve the aspect ratio of the inserted page. Optional.
-Rotate Rotates the image by the specified degrees clockwise. Optional.

Examples

To add an image file to a [PDF_Doc] variable:

Use the [PDF_Image] tag. The following example adds a file named Image.jpg in a /Documents/Images/ folder to a [PDF_Doc] variable named MyFile.

[Var:'Image'=(PDF_Image: -File='/Documents/Images/Image.jpg')]
[$MyFile->(Add: $Image, -Left=144.0, -Top=300.0)]

Related Tags