
Adds an image to the PDF document
Member of PRIM_PDF (PRIM_PDF)
Parameters
Name | Type | Data Type | Description |
---|---|---|---|
Bitmap | *Input | PRIM_BMP | The image to add to the PDF document |
ImageFileFormat | *Input | Enumeration | Image file format |
Left | *Input | Float | X Coordinate against left edge of the page |
Top | *Input | Float | Y Coordinate against upper edge of the page |
Width | *Input | Float | Width of the image |
Height | *Input | Float | Height of the image |
ImageCompression | *Input (Optional) | Enumeration | Compression of the generated JPEG |
Rotation | *Input (Optional) | Integer | Rotation 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 Value | Description |
---|---|
bmp | Bitmap |
gif | Graphic Interchange Format |
png | Portable Network Graphics |
jpg | Joint Photographic Experts Group Standard |
ImageCompression Allowed Values
Enum Value | Description |
---|---|
None | No compression |
Fast | Fast compression |
Medium | Medium compression |
Slow | Slow and maximum compression |
See also
LANSA Version 15, April 2020