PRIM_PDF - addImage Method

Adds an image to the PDF document

Member of PRIM_PDF (PRIM_PDF)

Parameters

NameTypeData TypeDescription
Bitmap*InputPRIM_BMPThe image to add to the PDF document
ImageFileFormat*InputEnumerationImage file format
Left*InputFloatX Coordinate against left edge of the page
Top*InputFloatY Coordinate against upper edge of the page
Width*InputFloatWidth of the image
Height*InputFloatHeight of the image
ImageCompression*Input (Optional)EnumerationCompression of the generated JPEG
Rotation*Input (Optional)IntegerRotation of the image in degrees (0-359)

Details

Adds an image to the PDF document.

Example

Adding an image
Define_Com Class(#PRIM_PDF) Name(#pdf) Unitm(mm) Pageformat(A4) Pageorientation(Portrait)
Define_Com Class(#PRIM_BMP) Name(#myBitmap) Reference(*DYNAMIC)
 
#pdf.start
 
#myBitmap <= #Sys_Appln.CreateBitmap( '/myPath/myImage.jpg' )
#pdf.addImage Bitmap(#myBitmap) Left(10) Top(55) Width(50) Height(60) Imagefileformat(jpg)
 
#pdf.save Filename('myReport.pdf')
 

ImageFileFormat Allowed Values

Enum ValueDescription
bmpBitmap
gifGraphic Interchange Format
pngPortable Network Graphics
jpgJoint Photographic Experts Group Standard

ImageCompression Allowed Values

Enum ValueDescription
NoneNo compression
FastFast compression
MediumMedium compression
SlowSlow and maximum compression


 
 

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020