14.1 GET_CODE128_PNG Function
This function generates a Code 128 barcode, configured according to the specified options, and returns a BLOB in PNG format.
Syntax
APEX_BARCODE.GET_CODE128_PNG (
p_value IN VARCHAR2,
p_scale IN NUMBER DEFAULT c_default_scale,
p_foreground_color IN VARCHAR2 DEFAULT c_default_foreground_color,
p_background_color IN VARCHAR2 DEFAULT NULL )
RETURN BLOB;
Parameters
Parameter | Description |
---|---|
p_value |
Value to be encoded into the Code 128 barcode. |
p_scale |
Makes the original PNG p_scale times larger (integer 1-10). Default 1 . The original size is determined by the input length.
|
p_foreground_color |
Foreground color. Must be in hex code. Default #000000 .
|
p_background_color |
Background color. Must be in hex code. Default null (transparent). |
Returns
The Code 128 barcode PNG image file.
Example
The following example generates a PNG Code 128-type barcode file with specified scale, foreground color, and background color.
DECLARE
l_output blob;
BEGIN
l_output := apex_barcode.get_code128_png(
p_value => 'apex.oracle.com',
p_scale => 1,
p_foreground_color => '#4cd964',
p_background_color => '#c7c7cc' );
END;
Parent topic: APEX_BARCODE