text_frame
Summary
Inserts a text with a frame (DEPRECATED).Usage
pdf( text_frame, text, hash( [ frameRGB, rgb_frame_color, ] [ frameCMYK, cmyk_frame_color, ] [ textRGB, rgb_text_color, ] [ textCMYK, cmyk_text_color, ] [ fontSize, font_size, ] [ fontName, font_name, ] [ padding, text_padding, ] [ leftPadding, left_text_padding, ] [ rightPadding, right_text_padding, ] [ topPadding, top_text_padding, ] [ bottomPadding, bottom_text_padding, ] [ roundEnds, round_ends ] ) )
Parameters
Name | Type | Description | Required |
---|---|---|---|
frameRGB | array | Frame RGB color. | No. |
frameCMYK | array | Frame CMYK color. | No. |
textRGB | array | Text RGB color. | No. |
textCMYK | array | Text CMYK color. | No. |
fontSize | integer | Font size. | No. |
fontName | string | Font name. | No. |
padding | integer | Padding around the text. | No. |
leftPadding | integer | Padding left of the text. | No. |
rightPadding | integer | Padding right of the text. | No. |
topPadding | integer | Padding above the text. | No. |
bottomPadding | integer | Padding below the text. | No. |
roundEnds | boolean | Squared or rounded frame edges. | No. |
text | string | The text that should be displayed inside the frame. | Yes. |
Description
This function creates a text with a colored frame around it. The frame has the size of the text plus the amount of padding. The padding can be specified for each side of the text with the parameters "leftPadding", "rightPadding", "topPadding", and "bottomPadding". If the padding is equal for each side, the "padding" parameter can be used instead.
The "leftPadding" and "rightPadding" parameters may be set to "-1", which will result in padding that reaches the page margin.
By default the frame has squared corners. If the "roundEnds" parameter is set to TRUE, the frame will have rounded corners.
The colors of the frame and the text can be specified using the "frameRGB", "frameCMYK", "textRGB", and "textCMYK" parameters. The RGB parameters must be arrays consisting of three integers between 0 and 255. The CMYK parameters must be arrays consisting of four decimal values between 0.0 and 1.0.
The font can be changed using the "fontSize" and "fontName" parameters.
Examples
Example 1
{pdf(text_frame, "Test frame", hash( roundEnds, true(), textCMYK, array(0.89, 0.43, 0.01, 0), frameRGB, array(255,255,128), padding, 8, fontSize, 14))}
This example creates a frame (with round edges) around the sentence "Test frame".
Balazs Halasy (14/05/2004 1:01 pm)
Julia Shymova (11/01/2008 1:11 pm)
Comments
There are no comments.