4D Write Pro attributes allow you to control all the graphical aspects of text and images stored in your documents. These attributes are handled by the following commands:
You can also handle 4D Write Pro area attributes through 4D object notation or generic commands:
- object notation - for example, the following statements are similar:
$bcol:=$range[wk background color]
$bcol:=$range.backgroundColor //same results
$bcol:=OB Get($range;wk background color)
Background attributes are used to define background effects in your documents. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | X | X | X | X | X | X | X |
Constant | Comment |
---|
wk background clip | Specifies painting area of background. Possible values:
- wk border box (default): background is painted to outside edge of the border
- wk content box: background is painted within the content box
- wk padding box: background is painted to outside edge of the padding (or to inside edge of the border, if any)
- wk paper box: background is painted to the edge (document or sections only)
|
wk background color | Specifies background color of an element. Possible values: - a CSS color ("#010101" or "#FFFFFF" or "red").
- a 4D color longint value (see OBJECT SET RGB COLORS command)
- a longint array containing an element for each R, G, B component (0-255)
Default for documents is "#FFFFFF" and wk transparent, or "transparent" for paragraphs and images. |
wk background display mode | Sets the display mode of images used as background, based on a preset of the following "real" attribute values: wk background origin, wk background repeat, wk background position horizontal, wk background position vertical, wk background width, wk background height Possible values: - wk scaled to fit
- wk truncated
- wk truncated centered
- wk proportional
- wk proportional centered
- wk replicated (default)
- wk replicated centered
Note: The origin rectangle is set to the padding box (the image rectangle including the padding area but excluding the border area). When getting the value of this attribute, the returned value is either: - one of the possible display modes, for example wk replicated, if all the real attributes have the preset values for this mode
- "custom" if at least one real attribute's value differs from the preset ones for any mode. For example, if the preset value of wk background width is changed after applying wk background display mode, WP GET ATTRIBUTES returns "custom" when getting the value of wk background display mode.
|
wk background height | Specifies vertical size of background image. Possible values:
- wk auto (default): background image retains its height
- wk contain: scales image to largest size so that it fits entirely in the content area, while preserving its aspect ratio. This option also modifies the value of the other size attributes.
- wk cover: scales background image to be as large as possible so that the background area is entirely covered by the background image, while preserving its aspect ratio. Some parts of the background image may be cropped. This option also modifies the value of the other size attributes.
- Defined size: background image vertical size expressed using a number or string value:
Real: Size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt. A relative value (percentage %) is also supported.
|
wk background image | Specifies a background image reference. Can be any valid image such as a 4D picture variable or expression.
- Value returned (WP GET ATTRIBUTES): If the image was defined through a network URL, the target image is returned if it was already loaded, otherwise an empty image is returned.
Use wk background image url if you want to handle pictures through URLs or local URIs. |
wk background image url | Background image defined through a URL (string). Can be a network URL, a data URI, or a local file URL (absolute or relative to the structure file).
- Value returned (WP GET ATTRIBUTES): Network URL or data URI. It may not be equal to the initial URL for an image not referenced with the network URL (only network URLs are kept). For local file URLs, the image stream itself is kept in the document and thus the URL returned is a data URI with the image stream encoded in base64.
Use wk background image if you want to handle background images as picture expressions. |
wk background origin | Specifies where background image is positioned. Possible values:
- wk padding box (default): background image starts at padding (or inside border edge) rectangle
- wk border box: background image starts at border (outside edge) rectangle
- wk content box: background image starts at content rectangle
- wk paper box: background image starts at edge (document or sections only)
|
wk background position horizontal | Specifies horizontal starting position of a background image. Possible values:
- wk left (default): background image starts horizontally on left side of the element
- wk center: background image starts horizontally at center of the element
- wk right: background image starts horizontally on right side of the element
|
wk background position vertical | Specifies vertical starting position of a background image. Possible values:
- wk top (default): background image starts vertically at top of the element
- wk middle: background image starts vertically at middle of the element
- wk bottom: background image starts vertically at bottom of the element
|
wk background repeat | Specifies if and how a background image is repeated. Possible values:
- wk repeat (default): background image is repeated both vertically and horizontally
- wk no repeat: background image is not repeated
- wk repeat x: background image is repeated only horizontally
- wk repeat y: background image is repeated only vertically
|
wk background width | Specifies horizontal size of background image. Possible values:
- wk auto (default): background image retains its width
- wk contain: scales image to largest size so that it fits entirely in the content area, while preserving its aspect ratio. This option also modifies the value of the other size attributes.
- wk cover: scales background image to be as large as possible so that the background area is entirely covered by the background image, while preserving its aspect ratio. Some parts of the background image may be cropped. This option also modifies the value of the other size attributes.
- Defined size: background image horizontal size expressed using a real or string value:
Real: Size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt. A relative value (percentage %) is also supported.
|
Border attributes are used to specify the style, width, and color of an element's border. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | X | X | X | X | X | X | X |
Constant | Comment |
---|
wk border color | Sets color of all four borders. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red").
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
Default is "#000000" (if string value). If there are multiple colors, WP GET ATTRIBUTES returns an empty string. |
wk border color bottom | Sets color of bottom border. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000"
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
|
wk border color left | Sets color of left border. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000"
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
|
wk border color right | Sets color of right border. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000"
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
|
wk border color top | Sets color of top border. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000"
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
|
wk border radius | Specifies a rounded border. Possible values:
- wk none (default): the border does not have rounded angles
- Radius value expressed using a number or a string value:
Number: Radius in wk layout unit.String: CSS string with value and unit concatenated.(e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
|
wk border style | Specifies style of all four borders. Possible values:
- wk none (default): no border
- wk hidden: same as wk none, except in border conflict resolution
- wk solid: solid border
- wk dotted: dotted border
- wk dashed: dashed border
- wk double: double border
- wk groove: 3D groove border (actual effect depends on the border color)
- wk ridge: 3D ridged border (actual effect depends on the border color)
- wk inset: 3D inset border (actual effect depends on the border color)
- wk outset: 3D outset border (actual effect depends on the border color)
|
wk border style bottom | Specifies style of bottom border. Possible values:
- wk none (default): no border
- wk hidden: same as wk none, except in border conflict resolution
- wk solid: solid border
- wk dotted: dotted border
- wk dashed: dashed border
- wk double: double border
- wk groove: 3D groove border (actual effect depends on the border color)
- wk ridge: 3D ridged border (actual effect depends on the border color)
- wk inset: 3D inset border (actual effect depends on the border color)
- wk outset: 3D outset border (actual effect depends on the border color)
|
wk border style left | Specifies style of left border. Possible values:
- wk none (default): no border
- wk hidden: same as wk none, except in border conflict resolution
- wk solid: solid border
- wk dotted: dotted border
- wk dashed: dashed border
- wk double: double border
- wk groove: 3D groove border (actual effect depends on the border color)
- wk ridge: 3D ridged border (actual effect depends on the border color)
- wk inset: 3D inset border (actual effect depends on the border color)
- wk outset: 3D outset border (actual effect depends on the border color)
|
wk border style right | Specifies style of right border. Possible values:
- wk none (default): no border
- wk hidden: same as wk none, except in border conflict resolution
- wk solid: solid border
- wk dotted: dotted border
- wk dashed: dashed border
- wk double: double border
- wk groove: 3D groove border (actual effect depends on the border color)
- wk ridge: 3D ridged border (actual effect depends on the border color)
- wk inset: 3D inset border (actual effect depends on the border color)
- wk outset: 3D outset border (actual effect depends on the border color)
|
wk border style top | Specifies style of top border. Possible values:
- wk none (default): no border
- wk hidden: same as wk none, except in border conflict resolution
- wk solid: solid border
- wk dotted: dotted border
- wk dashed: dashed border
- wk double: double border
- wk groove: 3D groove border (actual effect depends on the border color)
- wk ridge: 3D ridged border (actual effect depends on the border color)
- wk inset: 3D inset border (actual effect depends on the border color)
- wk outset: 3D outset border (actual effect depends on the border color)
|
wk border width | Specifies width of all four borders. You need to specify the border style before setting the border width. Possible values:
- Width expressed using a number or a string value:
Number: Width in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - Default value: 2pt
|
wk border width bottom | Specifies width of bottom border. Possible values:
- Width expressed using a number or a string value:
Number: Width in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - Default value: 2pt
|
wk border width left | Specifies width of left border. Possible values:
- Width expressed using a number or a string value:
Number: Width in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - Default value: 2pt
|
wk border width right | Specifies width of right border. Possible values:
- Width expressed using a number or a string value:
Number: Width in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - Default value: 2pt
|
wk border width top | Specifies width of top border. Possible values:
- Width expressed using a number or a string value:
Number: Width in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - Default value: 2pt
|
wk inside | When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding inter-paragraph property (not outside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command. |
wk outside | When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding paragraph external property (not inside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command. |
Document information attributes are used to set or get standard document information or document-level settings. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | | | | | | | | |
Document Information
Constant | Comment |
---|
wk author | Specifies name of author of the document (string) |
wk company | Specifies a company associated with the document (string) |
wk date creation | Returns creation date of document (date). This value is read-only and cannot be set. |
wk date modified | Returns last modification date of document (date). This value is read-only and cannot be set. Note that this value is dynamically updated each time the document contents are edited, but not when the document is opened or saved. |
wk dpi | DPI used for internal pixels <-> points conversion (integer). Always 96 (read-only). Do not confuse this internal attribute with the standard "dpi" action that allows modifying or reading the DPI of the current view of the document. |
wk modified | Indicates if the document has been modified since its associated object was created (see below). Possible values: - True - document has been modified
- False - document has not been modified (default when the object is created)
This property is always set to false when the object containing the document is created (i.e. with WP Import document, WP New, an object copy or when the object field/attribute is loaded from the database). It is automatically set to true by 4D Write Pro as soon as a modification is done to the contents of the document, whatever the origin of the modification (user action or programming). Notes: - A new value evaluated from a formula or a new image loaded from a URL is not considered as a document modification (the source string is left untouched).
- Once set to true by 4D Write Pro, this property is never automatically set back to false, even if an "undo" or an "export" action is executed. However, since it is a read-write property, it can be set by your code.
- Unlike wk date modified, wk modified is volatile, i.e. it is not stored in the document.
|
wk notes | Specifies comments about the document (string). |
wk subject | Specifies document subject (string) |
wk title | Specifies document title (string). Default is "New 4D Write Pro Document" |
wk version | Returns internal 4DWP version of the document (real). This number is only read using WP GET ATTRIBUTES; it cannot be set. |
Document Settings
Constant | Comment |
---|
wk break paragraphs in formulas | Defines if carriage returns (CR) returned by formulas are treated as paragraph breaks. Possible values: - wk true - Interpreted as paragraph breaks
- wk false - (default value) Interpreted as line breaks
Note: If a formula uses This.pageNumber or This.pageCount, the attribute is ignored, carriage returns are always interpreted as line breaks. |
wk tab decimal separator | Character used as decimal separator by decimal tabulations (see wk tabs). Possible values: - wk point or comma: use the first dot or comma from the right (default for new blank documents)
- wk point: use the point character
- wk comma: use the comma character
- wk system: use decimal separator as returned by GET SYSTEM FORMAT (default for imported legacy 4D Write documents)
|
Fonts and text
These attributes define the font family, size, and style of the text. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X* | X* | X* | X* | X* | X* | X* | X* | |
*Applied to paragraph characters within elements
Constant | Comment |
---|
wk font | Specifies complete font name with styles, as returned by the FONT STYLE LIST command. If you set an invalid font name, the command does nothing. Default value: "Times New Roman". |
wk font bold | Specifies thickness of text (depends on available font styles). Possible values:
- wk true to set selected characters to bold font style; with the WP GET ATTRIBUTES command, wk true is returned if at least one selected character supports a bold font style.
- wk false (default) to remove the bold font style from selected characters if any; with the WP GET ATTRIBUTES command, wk false is returned if none of the selected characters supports a bold font style.
|
wk font default | Object defining the default substitution font(s) for the document (i.e. fonts to be used instead of document fonts that are not available in the OS). It contains: Property | Type | Description | default | String | Collection | Font(s) to be used by default as replacement if a font is not supported by the OS, whatever the platform | windows | String | Collection | Font(s) to be used by default on Windows platform (prior to "default" if defined) | mac | String | Collection | Font(s) to be used by default on macOS platform (prior to "default" if defined) | Notes: - Each property can contain a string (e.g. "Arial") or a collection of strings (e.g. ["Arial","sans-serif"]). Font names must be family font names or "sans-serif", "serif", "monospace", "cursive" or "fantasy" to target generic font family like in html/css font-family.
- By default if the wk font default is not set, or if none of defined fonts are available on a platform, font substitution is delegated to the OS.
|
wk font family | Specifies font family name as defined by wk font. Default value is "Times New Roman". An empty string is returned by the WP GET ATTRIBUTES command if the selected characters contain different font family properties. |
wk font italic | Specifies italic style of text (depends on available font styles). Possible values:
- wk true to set selected characters to italic or oblique font style; with the WP GET ATTRIBUTES command, wk true is returned if at least one selected character supports an italic or oblique font style.
- wk false (default) to remove the italic or oblique font style from selected characters if any; with the WP GET ATTRIBUTES command, wk false is returned if none of the selected characters supports an italic or oblique font style.
|
wk font size | Specifies font size for text. Possible values (in points only):
- Real value (default = 12)
- CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points)
|
wk text color | Specifies color of text. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000" if string.
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
|
wk text linethrough color | Specifies color of text linethrough. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red").
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
Default is "currentColor" if string, or wk default if longint. |
wk text linethrough style | Specifies style of text linethrough (if any). Possible values:
- wk none (default): no linethrough effect
- wk solid: draw a solid line on the selected text
- wk dotted: draw a dotted line on the selected text
- wk dashed: draw a dashed line on the selected text
- wk double: draw a double line on the selected text
- wk semi transparent: dimmed line on the selected text. Can be combined with another line style.
- wk word: draw a line on words only (exclude blank spaces). Can be combined with another line style.
|
wk text shadow color | Specifies shadow color of the selected text. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red").
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
- wk transparent (default)
|
wk text shadow offset | Specifies offset for shadow effect. Possible values:
- Size expressed in points. Default value: 1pt
|
wk text transform | Specifies uppercase and lowercase letters in the text. Possible values:
- wk capitalize: first letters are set to uppercase
- wk lowercase: letters are set to lowercase
- wk uppercase: letters are set to uppercase
- wk small uppercase: letters are set to small uppercase
- wk none (default): no transformation
|
wk text underline color | Specifies color of text underline. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red").
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
Default is "currentColor" if string, or wk default if longint. |
wk text underline style | Specifies style of text underline (if any). Possible values:
- wk none (default): no underline
- wk solid: draw a solid underline
- wk dotted: draw a dotted underline
- wk dashed: draw a dashed underline
- wk double: draw a double underline
- wk semi transparent: dimmed underline. Can be combined with another line style.
- wk word: draw an underline for words only (exclude blank spaces). Can be combined with another line style.
|
wk vertical align | Sets vertical alignment of an element. Can be used with characters, paragraphs, and pictures. Possible values:
- wk baseline (default): aligns baseline of element with baseline of parent element
- wk top: aligns top of element with top of tallest element on the line
- wk bottom: aligns bottom of element with lowest element on the line
- wk middle: element is placed in middle of parent element
- wk superscript: aligns element as if it were superscript
- wk subscript: aligns element as if it were subscript
For characters, wk top and wk bottom have the same effect as wk baseline. For paragraphs, wk baseline, wk superscript and wk subscript have the same effect as wk top. |
Height/width attributes are used to set the height and width of elements. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | X | X* | X | X | | | |
*Applied to cells
Constant | Comment |
---|
wk height | Sets height of element. The height property does not include padding, borders, or margins; it sets the height of the area inside the padding, border, and margin of the element. Possible values:
- wk auto (default): height is based upon the contents of the element
- Defined size: size expressed using real or string value:
Real: Size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt. The wk height attribute is overridden by wk min height (if defined). |
wk min height | Sets minimum height of the element. It prevents the value of the wk height property from becoming smaller than wk min height. Possible values:
- wk auto (default): minimum height is based upon the contents of the element
- Defined size: size expressed using real or string value:
Real: Size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt. The wk min height value overrides the wk height attribute. Note: This attribute is not supported by rows, columns, and cells. |
wk min width | Sets minimum width of element. It prevents the value of the wk width property from becoming smaller than wk min width. Possible values:
- wk auto (default): minimum width is based upon the contents of the element
- Defined size: size expressed using real or string value:
Real: Size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt. The wk min width value overrides the wk width attribute. |
wk width | Sets width of element. Possible values: - wk auto (default): width is based upon the contents of the element. Not available for text boxes (converted to 8 centimeters).
- Defined size: size expressed using a real or string value:
Real: Size in wk layout unit. String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt. The wk width attribute is overridden by wk min width if defined.
|
Image attributes are used to handle pictures inserted or or added in the area. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X* | X* | X* | | | | | |
*Applied to pictures in cells (inline pictures only)
Reminder: As detailed in the Handling pictures section, 4D Write Pro supports two kinds of pictures:
The following attributes are avalaible for both inline and anchored pictures:
Constant | Comment |
---|
wk image | Specifies an image reference. Can be any valid image such as a 4D picture variable or expression.
- Value returned (WP GET ATTRIBUTES): If the image was defined through a network URL, the target image is returned if it was already loaded, otherwise an empty image is returned.
Use wk image url if you want to handle pictures through URLs or local URIs. |
wk image alternate text | Specifies alternative text for image, if image cannot be displayed. |
wk image display mode | Sets the display mode of anchored and inline images. Possible values: - wk scaled to fit (default)
- wk truncated
- wk truncated centered
- wk proportional
- wk proportional centered
- wk replicated
- wk replicated centered
Note: The origin and clipping rectangles are always set to the content box (the image rectangle excluding the padding and border area). Use wk background display mode if you want to set the display mode of images used as background. |
wk image url | Specifies an image defined through a URL (string). Can be a network URL or a data URI, absolute or relative to the structure file.
- Value returned (WP GET ATTRIBUTES): Network URL or data URI. It may not be equal to the initial URL for an image not referenced with the network URL (only network URLs are kept). For local file URLs, the image stream itself is kept in the document and thus the URL returned is a data URI with the image stream encoded in base64.
Use wk image if you want to handle images as picture expressions. |
wk owner | (Read-only attribute) Owner of the range/object/section/subsection (reference to the document for section/subsection). Value type: Object |
wk type | Type of 4D Write Pro object. Possible values: - wk type default: Range or section with not defined type
- wk type character: Character type
- wk type paragraph: Paragraph type range
- wk type image: Image (anchored and inline)
- wk type container: Header or footer, for instance
- wk type table: Table reference
- wk type text box: Text box
For ranges of cells, columns and rows only: - wk type table row: Table row reference
- wk type table cell: Table cell reference
- wk type table column: Table column reference
For subsections only: - wk first page: First page subsection
- wk right page: Right page subsection
- wk left page: Left page subsection
For tabs only, value used in the object for wk tab default or the objects of the collection for wk tabs: - wk left: Aligns tab to the left
- wk right: Aligns tab to the right
- wk center: Aligns tab to the center
- wk decimal: Aligns tab on the decimal
- wk bar: Inserts vertical bar at tab position
|
The following attributes are avalaible for inline pictures only:
Constant | Comment |
---|
wk end | (Read-only attribute)
- Range end offset, or
- Section or subsection text end index in the document body (for subsection, text end index of the parent section).
Value type: Longint |
wk start | (Read-only attribute)
- Range start offset, or
- Section or subsection text start index in the document body (for subsection, text start index of the parent section).
Value type: Longint |
wk vertical align | Sets vertical alignment of an element. Can be used with characters, paragraphs, and pictures. Possible values:
- wk baseline (default): aligns baseline of element with baseline of parent element
- wk top: aligns top of element with top of tallest element on the line
- wk bottom: aligns bottom of element with lowest element on the line
- wk middle: element is placed in middle of parent element
- wk superscript: aligns element as if it were superscript
- wk subscript: aligns element as if it were subscript
For characters, wk top and wk bottom have the same effect as wk baseline. For paragraphs, wk baseline, wk superscript and wk subscript have the same effect as wk top. |
The following attributes are avalaible for anchored pictures only:
Constant | Comment |
---|
wk anchor horizontal align | Defines the horizontal alignment of an image or a text box relative to the origin (see wk anchor origin). Possible values: - wk left - left align
- wk center - center align (not compatible with HTML, images are not displayed on the web)
- wk right - right align
|
wk anchor horizontal offset | Defines the horizontal offset of an image or a text box expressed in a CSS dimension string or longint (cm or pt or pixel) from wk layout unit. Possible values: - Left or right limit of the page relative to the wk anchor horizontal align
- Left or right limit of body in embedded mode (if wk anchor section = wk anchor embedded)
Default value = 0. |
wk anchor layout | Defines the layout position of an image or a text box relative to the text on a page. Possible values: - wk behind text - image or text box is anchored, behind the text
- wk in front of text - image or text box is anchored, in front of the text
- wk text wrap top bottom - image or text box is anchored with text wrapped above and below the image or text box with empty sides to its left and right
- wk text wrap square - image or text box is anchored with text wrapped all around the imagine or text box
- wk text wrap square left - image or text box is anchored with text wrapped on the left of the image or text box
- wk text wrap square right - image or text box is anchored with text wrapped on the right of the image or text box
- wk text wrap square largest - image or text box is anchored with text wrapped on the largest side of the image or text box
- wk inline with text - image is inline with text (default for images inserted with WP INSERT PICTURE). Not available for text boxes. Read-only attribute (inline pictures cannot be converted to anchored pictures by programming).
|
wk anchor origin | Defines if image or text box is anchored to the page, header or footer. Possible values: - wk paper box (default) - image or text box is anchored to the edge of the page
- wk header box - image or text box is anchored to the document header. If the header is not visible, image or text box is not displayed.
- wk footer box - image or text box is anchored to the document footer. If the footer is not visible, image or text box is not displayed.
This selector is ignored in embedded mode. |
wk anchor page | Defines the page index or the type of page an image or a text box is anchored to. Possible values: - wk anchor all - anchors an image or a text box to all pages of the section(s) defined by wk anchor section
- wk anchor first page - anchors an image or a text box to the first page subsection of the section(s) defined by wk anchor section
- wk anchor left page - anchors an image or a text box to the left pages subsection of the section(s) defined by wk anchor section
- wk anchor right page - anchors an image or a text box to the right pages subsection of the section(s) defined by wk anchor section
- a number (Longint >= 0) indicating which page to anchor the image or text box to. In this case, wk anchor section = wk anchor all. Section anchoring is ignored if an image or a text box is anchored to a single page.
Note: Images and Text boxes in Page mode are not displayed in browsers. |
wk anchor section | Defines the section index or the type of section that an image or a text box is anchored to. Possible values: - wk anchor all (default) - anchors an image or a text box to all sections in a document (image or text box is only visible in page mode)
- wk anchor embedded - anchors an image or a text box to the document body in embedded mode (image or text box is only visible in embedded mode)
- a number (Longint >= 1) indicating the section to anchor the image or text box to (image or text box is only visible in page mode).
Note: Images or text boxes in Page mode are not displayed in browsers. |
wk anchor vertical align | Defines the vertical alignment of an image or a text box relative to the origin (see wk anchor origin). Possible values: - wk top - top align
- wk center - middle align (not compatible with HTML, images are not displayed in browsers)
- wk bottom - bottom align
|
wk anchor vertical offset | Defines the vertical postion of an image or a text box expressed in a CSS dimension string or number (cm or pt or pixel). Possible values: - Top, center or bottom limit of the page (see wk anchor origin) or
- Top, center or bottom limit of body in embedded mode (if wk anchor section = wk anchor embedded).
Default value = 0. |
wk id | ID of the element (header, footer, body, paragraph, image, text box, table, or row). Value type: String Note: The ID cannot be empty for a text box. |
wk image expression | Specifies an anchored image defined through a 4D expression.
Note:
- If the expression can not be evaluated or does not return a valid 4D picture, an unloaded image graphic will be displayed (empty image with black border).
- If attribute is set to " " or used with WP RESET ATTRIBUTES, the expression will be removed and the image will no longer be defined by it. Doing this before the image has been computed will result in an empty image.
|
wk image formula | Specifies an anchored image defined through a 4D formula object.
Note: - If the formula can not be evaluated or does not return a valid 4D picture, an unloaded image graphic will be displayed (empty image with black border).
- If attribute is set to Null or used with WP RESET ATTRIBUTES, the formula will be removed and the image will no longer be defined by it. Doing this before the image has been computed will result in an empty image.
|
Layout attributes define how columns, sections, subsections, or pages are formatted in the document. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | | | | | | | |
Note: Documents in embedded mode use wk margin attributes (see Margin below). In page mode, document, sections and subsections use wk page margin attributes.
Constant | Comment |
---|
wk column count | (Available for tables, documents and sections) Number of columns. Value type: Longint- For a table: read-only attribute
- For a document or a section: read-write attribute. Default value=1 (single column). Maximum value=20
|
wk column rule color | Vertical column rule color. Possible values:
- a CSS color ("#010101" or "#FFFFFF" or "red"). Default is "#000000" (black)
- a 4D color longint value (see
OBJECT SET RGB COLOR command) - a longint array containing an element for each R, G, B component (0-255)
|
wk column rule style | Vertical column rule style. Possible values:
- wk none (default): no rule
- wk hidden: same as wk none, except in rule conflict resolution
- wk solid: solid rule
- wk dotted: dotted rule
- wk dashed: dashed rule
- wk double: double rule
- wk groove: 3D groove rule (actual effect depends on the rule color)
- wk ridge: 3D ridged rule (actual effect depends on the rule color)
- wk inset: 3D inset rule (actual effect depends on the rule color)
|
wk column rule width | Vertical column rule width. Possible values:
- Real: width in wk layout unit.
- String: width value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
Default value="2.5pt"
|
wk column spacing | (For documents or sections only) Spacing between two columns. Possible values:
- Real: width in wk layout unit
- String: width value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters).
Default value="12pt"
|
wk column width | (For documents or sections only) Read-only attribute. Current width for each column, i.e. computed width based upon actual page width, page margins, column count and column spacing. For the document, uses the default section column width, so can be different from the actual column width of section(s) if some attributes are overriden in a section. Possible values:
- Real: width in wk layout unit.
- String: width value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters)
|
wk header and footer autofit | Specifies if the height of a 4D Write Pro document's headers and footers resize automatically to avoid truncating their contents. Possible values: - wk true (default for 4D Write Pro documents)
- wk false (default for converted 4D Write documents)
|
wk layout unit | Specifies unit of dimension by default for the document when a value is set or get as a number. Designates unit for the ruler as well as for dimension attributes such as wk width, except for wk font size, wk border width (and its variations), wk border radius and wk text shadow offset for which the unit for number values is always the point. Possible values:
- wk unit cm (default): centimeters
- wk unit pt: points
- wk unit px: pixels
- wk unit percent (only for wk line height and wk background size h / wk background size v)
- wk unit mm: millimeters
- wk unit inch: inches
Note: When a unit that is not supported by the ruler is selected through this attribute (i.e. wk unit px or wk unit percent), the ruler then uses the cm unit. |
wk page first number | Page number of the first page of the section or document (Read-only with subsections). Possible values: any integer value >=1 |
wk page first right | The first page of the document is a right page (Read-only with section or subsection). Possible values:
- True (default): document starts on a right page
- False: document starts on a left page
|
wk page height | Page height (in page mode) expressed using a real or string value (Read-only with section or subsection). Possible values:
- Real: Height in wk layout unit.
- String: CSS string with value and unit concatenated (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters). Supported units: pt,cm,mm, inches.
|
wk page margin | Size for all margins of the page (page mode). Default is 2.5cm. Possible values:
- Real: Size in wk layout unit.
- String: CSS string with value and unit concatenated (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters). Supported units: pt, cm, mm, px, inches.
- wk none: no specific margin.
|
wk page margin bottom | Size for bottom margin of the page (page mode). Possible values:
- Real: Size in wk layout unit.
- String: CSS string with value and unit concatenated (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters). Supported units: pt, cm, mm, px, inches.
- wk none: no specific margin.
|
wk page margin left | Size for left margin of the page (page mode). Possible values:
- Real: Size in wk layout unit.
- String: CSS string with value and unit concatenated (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters). Supported units: pt, cm, mm, px, inches.
- wk none: no specific margin.
|
wk page margin right | Size for right margin of the page (page mode). Possible values:
- Real: Size in wk layout unit.
- String: CSS string with value and unit concatenated (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters). Supported units: pt, cm, mm, px, inches.
- wk none: no specific margin.
|
wk page margin top | Size for top margin of the page (page mode). Possible values:
- Real: Size in wk layout unit.
- String: CSS string with value and unit concatenated (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters). Supported units: pt, cm, mm, px, inches.
- wk none: no specific margin.
|
wk page orientation | Orientation of the page. Possible values:
- wk portrait (0) (default)
- wk landscape (1)
|
wk page size | Defines the document's page size (modifies the attributes wk page height and wk page width). Possible values: - Printer paper size names.
- Standard ISO paper sizes (The ISO paper size supported values are: "A0" to "A10", "B0" to "B10" , "C0" to "C10", "DL" ,"Letter", "Junior Legal" , "Legal" and "Tabloid").
- Custom paper size names defined by the user.
Priority is given to current printer paper sizes over ISO sizes. Unknown formats trigger an error. |
wk page width | Page width (in page mode) expressed using a real or string value (Read-only with section or subsection). Possible values:
- Real: Width in wk layout unit.
- String: CSS string with value and unit concatenated (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters). Supported units: pt,cm,mm, inches.
|
Link attributes are used to set or get URLs added to ranges. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X* | X | X | X | | | | |
*Inline pictures only
Constant | Comment |
---|
wk link url | Hyperlink assigned to the range. Possible values:
- absolute url, for example "http://www.4d.com/"
- relative link, for example "/test/page.html" (the link is relative to the database structure file)
- bookmark link, for example "#Introduction"
- 4D method link, for example "method4D:myAlert?parameter='Hello%World!'"
- empty string = no link
|
4D Write Pro supports two main types of lists:
- unordered lists: where list items are marked with bullets
- ordered lists: where list items are marked with numbers or letters
List attributes are used to configure your lists and set different list item fonts or markers. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X* | X* | X* | | | | | |
*Applied to paragraphs within cells
Constant | Comment |
---|
wk list font | Specifies complete font name, as returned by the FONT STYLE LIST command, to display the list item marker (but not the paragraph text). If the system does not recognize the font name, it handles the substitution. If you set an invalid font name, the command does nothing. Default value: "Times". |
wk list font family | Specifies font family name as defined by wk list font used to display the list item marker (but not the paragraph text). Default value is "Times New Roman". |
wk list start number | Sets starting value of an ordered list. Possible values:
- wk auto (default): sets the starting value to 0.
- an integer value: starting value
|
wk list string format LTR | List item marker string format for left-to-right paragraph direction. If defined, it overrides default list item marker string format for the list.
- For unordered lists: string used as list item marker (usually a single character string, e.g. "-")
- For ordered lists: string containing the "#" character. "#" is a placeholder for the computed number or letter(s). Default is “#.”, so if current list item number is 15 and list style type is decimal, list item marker string will be "15."
|
wk list string format RTL | List item marker string format for right-to-left paragraph direction. If defined, it overrides default list item marker string format for the list.
- For unordered lists: string used as list item marker (usually a single character string, e.g. "-")
- For ordered lists: string containing the "#" character. "#" is a placeholder for the computed number or letter(s). Default is “#.”, so if current list item number is 15 and list style type is decimal, list item marker string will be "15."
|
wk list style image | Specifies an image reference as the list item marker in an unordered list. Possible values:
- wk none (default): list item marker is not defined by an image
- any valid image such as a 4D picture variable or expression
- Value returned (WP GET ATTRIBUTES): If the image was defined through a network URL, the target image is returned if it was already loaded, otherwise an empty image is returned.
Use wk list style image url if you want to handle pictures through URLs or local URIs. |
wk list style image height | Sets height of image used as list item marker. Possible values:
- wk auto (default): height is based upon image size
- Defined size: size expressed using real or string value:
Real: Size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt.
|
wk list style image url | Image as the list item marker in an unordered list, defined through a URL (string). Possible values:
- wk none (default): list item marker is not defined by an image
- a network URL or a data URI, absolute or relative to the structure file
- Value returned (WP GET ATTRIBUTES): Network URL or data URI. It may not be equal to the initial URL for an image not referenced with the network URL (only network URLs are kept). For local file URLs, the image stream itself is kept in the document and thus the URL returned is a data URI with the image stream encoded in base64.
Use wk list style image if you want to handle list item marker images as picture expressions. |
wk list style type | Specifies type of ordered or unordered list item marker. Possible values are:
- wk disc (default)
- wk circle
- wk square
- wk decimal: 1 2 3
- wk decimal leading zero: 01 02 03
- wk lower latin: a b c
- wk lower roman: i ii iii iv
- wk upper latin: A B C
- wk upper roman: I II III IV
- wk lower greek: alpha, beta, gamma, etc.
- wk armenian
- wk georgian
- wk hebrew
- wk hiragana
- wk katakana
- wk cjk ideographic
- wk hollow square
- wk diamond
- wk club
- wk decimal greek
- wk custom: unordered list with "-" as default list item marker; this is a convenience style used in order to customize a list item marker with wk list string format LTR or wk list string format RTL without modifying standard list item markers
- wk none
|
Margins are the area that is outside the border of an element. They are transparent. The following picture illustrates the various elements that can be configured for a "box" element:
Margin attributes can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | X | X | X | X | | | |
Note: Sections and subsections use wk page margin attributes; wk margin attributes are only used by documents in embedded mode (see Layout above).
Constant | Comment |
---|
wk inside | When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding inter-paragraph property (not outside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command. |
wk margin | Specifies size for all margins of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific margin
|
wk margin bottom | Specifies size for bottom margin of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific margin
|
wk margin left | Specifies size for left margin of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific margin
|
wk margin right | Specifies size for right margin of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific margin
|
wk margin top | Specifies size for top margin of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific margin
|
wk outside | When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding paragraph external property (not inside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command. |
Padding is the white space between the element content and the element border. Padding is affected by the background color of the element.
The following picture illustrates the various elements that can be configured for a "box" element:
Padding attributes can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | X | X | X* | X* | X | X | X |
*Applied to cells
Constant | Comment |
---|
wk inside | When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding inter-paragraph property (not outside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command. |
wk outside | When the selected area contains several paragraphs, specifies that the attribute should affect only the corresponding paragraph external property (not inside). It applies only to border, padding and margin attributes, and must be added to the specified attribute. See example 2 of the WP SET ATTRIBUTES command. |
wk padding | Specifies size of padding for all sides of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific padding
|
wk padding bottom | Specifies size of padding for bottom of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific padding
|
wk padding left | Specifies size of padding for left side of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific padding
|
wk padding right | Specifies size of padding for right side of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific padding
|
wk padding top | Specifies size of padding for top of the element. Possible values:
- Size expressed using a number or a string value:
Number: size in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) - wk none (default): no specific padding
|
Paragraph attributes are used to define properties for the text organization within a paragraph. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X* | X* | X* | X* | X* | | | |
*Applied to paragraphs within elements
Constant | Comment |
---|
wk avoid widows and orphans | Enables or disables the widow and orphan control. When enabled, 4D Write Pro does not allow widows (last line of a paragraph isolated at the top of a page) or orphans (first line of a paragraph isolated at the bottom of a page) in the document. Possible values:
- wk true (default): widow and orphan control is enabled
- wk false: widow and orphan control is disabled (isolated lines are allowed)
- wk mixed when reading the attribute
|
wk direction | Specifies text direction of paragraph. Possible values:
- wk left to right (default)
- wk right to left
|
wk id | ID of the element (header, footer, body, paragraph, image, text box, table, or row). Value type: String Note: The ID cannot be empty for a text box. |
wk keep with next | Links a paragraph with the next so that they cannot be separated by automatic page or column breaks. If applied to a target that is not a paragraph, this option is applied to the paragraphs inside the target. Possible values: - true - Paragraph is linked with the next
- false - (default) Paragraph is not linked with the next
If a break is manually added between two linked paragraphs, this attribute is ignored. If this attribute is applied to the last paragraph of the last cell in a table, the last row of the table is linked to the following paragraph. |
wk line height | Specifies space between lines. Possible values:
- wk normal (default): use value based upon text size
- Height expressed using a number or a string value:
Real: height in wk layout unit.String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) A relative value (percentage %) is also supported.
|
wk page break inside paragraph | Controls the automatic page break feature inside paragraphs. It applies: - to all the paragraphs inside the target
- to the parent paragraph(s) when the target is a text range
Possible values: - wk auto (default): no constraints regarding page breaks inside the paragraph/table
- wk avoid: prevents paragraph from being broken into parts on two or more pages (when possible).
|
wk tab default | Object containing the attributes of the default tab within the target (e.g., paragraph, body, etc.). Default tab attributes can include: Property | Type | Description | wk type | Longint | Tab alignment (wk left, wk right, wk center, wk decimal, wk bar). | wk offset | Longint | Tab position. Value must be greater than 0. | wk leading | String | Tab leading character. | Note: As a shortcut for defining the offset only, you can directly pass a numeric value in the current unit (e.g., 1.5) or a CSS text value (e.g., "3cm"). 4D will construct the tab object automatically. |
wk tab stop leadings | COMPATIBILITY NOTE: While this selector continues to work for compatibility purposes, it is recommended to use wk tab default or wk tabs instead. Specifies the leading characters for tabs in paragraph ranges. Possible values: Synchronized with the wk tab stop offsets and wk tab stop types arrays. |
wk tab stop offsets | COMPATIBILITY NOTE: While this selector continues to work for compatibility purposes, it is recommended to use wk tab default or wk tabs instead. Specifies tab offsets for the target. Possible values: - Array of tab offset values
COMPATIBILITY NOTE: Previously the last value of the array was the default tab offset value (not an absolute value). As of 4D v17 R5, the last value is an absolute value (not the default value). Use wk tab default to define the default tab value. - Scalar value
Values are expressed using CSS strings (default) or Real values in wk layout unit. Maximum value is 10,000pt. Synchronized with the wk tab stop leadings and wk tab stop types arrays. |
wk tab stop types | COMPATIBILITY NOTE: While this selector continues to work for compatibility purposes, it is recommended to use wk tab default or wk tabs instead. Specifies tab stop type for the paragraph. Possible values: - array of tab stop type values (if tab stops have been defined through an array).
- wk left (default)
- wk right
- wk center
- wk decimal
- wk bar
Synchronized with the wk tab stop offsets and wk tab stop leadings arrays. |
wk tabs | Collection of tab objects. Each tab object contains one or more of the following attributes: Property | Type | Description | wk type | Longint | Tab alignment (wk left, wk right, wk center, wk decimal, wk bar). | wk offset | Longint | Tab position. Value must be greater than 0. | wk leading | String | Tab leading character. | Note: As a shortcut for defining the offset only, when using WP SET ATTRIBUTES you can pass a numeric value in the current unit (e.g., 1.5) or a CSS text value (e.g., "3cm") as a collection element. 4D will construct the tab object automatically. An empty collection is returned by the WP GET ATTRIBUTES command if the target: - contains mixed tab values, or
- does not contain absolute values.
|
wk text align | Specifies horizontal alignment of text in the paragraph. Possible values:
- wk left (default)
- wk right
- wk justify
- wk center
|
wk text indent | Specifies indentation of first line in the paragraph. Possible values:
- Real: Size in wk layout unit. Default is 0.
- String: CSS string with value and unit concatenated. (e.g.: "12pt" for 12 points, or "1.5cm" for 1.5 centimeters) Minimum value: 0pt, maximum value: 10,000pt.
|
wk vertical align | Sets vertical alignment of an element. Can be used with characters, paragraphs, pictures, text boxes, tables, table rows, and table columns/cells. Cannot be used with sections or subsections. Possible values: - wk baseline: aligns baseline of element with baseline of parent element
- wk top: aligns top of element with top of tallest element on the line
- wk bottom: aligns bottom of element with lowest element on the line
- wk middle: element is placed in middle of parent element
- wk superscript: aligns element as if it were superscript
- wk subscript: aligns element as if it were subscript
For characters, wk top and wk bottom have the same effect as wk baseline. For paragraphs, wk baseline, wk superscript and wk subscript have the same effect as wk top. For tables, table rows, and table columns/cells, only wk top, wk bottom and wk middle values are supported. |
The read/write status of a 4D Write Pro target can be defined using the wk protected attribute. Defining a target as protected makes it uneditable once protection is enabled globally for the document (with the wk protection enabled attribute). Until global protection is enabled, targets with the wk protected attribute set to "true" can still be edited and modified.
The following attribute is used to control the global document protection. It can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | | | | | | | | |
Constant | Comment |
---|
wk protection enabled | Enables or disables the global protection (read/write) status of a 4D Write Pro document. Possible values: - wk true - Protection is enabled. Protected targets in the document cannot be modified.
- wk false - Protection is disabled. (default) All targets in the document can be modified.
|
The following attribute is used to control the protection status of specific content. It can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | X | X | X | X | X | X | X |
Constant | Comment |
---|
wk protected | Defines the read/write protection status for a 4D Write Pro target (excluding style sheets). Possible values: - wk true - The target is defined as protected and cannot be modified when global protection is enabled.
- wk false - The target is not protected. (default)
- wk mixed - (Range targets only). Part of the target is defined as protected. The protected part cannot be modified when global protection is enabled.
Note: Changing the protection status of a parent target will also change the status of any of the target's children. |
Specific edit actions are handled in the following situations for protected targets:
- Copy / Paste content - When protected content is copied, all of its attributes are copied with it. If pasted into a document with global protection:
- Enabled - Protection on the pasted content is disabled, allowing it to be modified.
- Disabled - Protection on the pasted content remains intact and uneditable.
- Modify / Delete pictures
- Anchored picture - If protection is enabled on an anchored picture, no deletions or modifications can be made.
- Inline picture - If a protected inline picture is embedded within an unprotected paragraph, it can be deleted but its attributes cannot be modified.
- Add / Delete rows or columns - Rows and columns can only be added or deleted when protection is disabled for a table. When protection is enabled for a table, no changes are possible.
- Delete paragraphs - When located between protected content, an unprotected paragraph can be cleared but not deleted.
Range attributes are read-only and provide information about range properties. Range attributes can only be applied to range objects.
Constant | Comment |
---|
wk break type | (Read-only attribute) Type of break within a break range object returned by WP Get breaks. Possible values: - wk line break,
- wk paragraph break,
- wk column break,
- wk page break,
- wk section break
|
wk end | (Read-only attribute)
- Range end offset, or
- Section or subsection text end index in the document body (for subsection, text end index of the parent section).
Value type: Longint |
wk owner | (Read-only attribute) Owner of the range/object/section/subsection (reference to the document for section/subsection). Value type: Object |
wk start | (Read-only attribute)
- Range start offset, or
- Section or subsection text start index in the document body (for subsection, text start index of the parent section).
Value type: Longint |
wk type | Type of 4D Write Pro object. Possible values: - wk type default: Range or section with not defined type
- wk type character: Character type
- wk type paragraph: Paragraph type range
- wk type image: Image (anchored and inline)
- wk type container: Header or footer, for instance
- wk type table: Table reference
- wk type text box: Text box
For ranges of cells, columns and rows only: - wk type table row: Table row reference
- wk type table cell: Table cell reference
- wk type table column: Table column reference
For subsections only: - wk first page: First page subsection
- wk right page: Right page subsection
- wk left page: Left page subsection
For tabs only, value used in the object for wk tab default or the objects of the collection for wk tabs: - wk left: Aligns tab to the left
- wk right: Aligns tab to the right
- wk center: Aligns tab to the center
- wk decimal: Aligns tab on the decimal
- wk bar: Inserts vertical bar at tab position
|
These attributes are specific to rows and/or columns. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | | | | | | | |
Constant | Comment |
---|
wk column count | (Available for tables, documents and sections) Number of columns. Value type: Longint- For a table: read-only attribute
- For a document or a section: read-write attribute. Default value=1 (single column). Maximum value=20
|
wk first column | (Read-only attribute) Number of the first table column included in the range. Value type: Longint |
wk first row | (Read-only attribute) Number of the first table row included in the range. Value type: Longint |
wk header | Specifies if the row is a header row for the table. The header attribute can be either a boolean (default) or an integer. Possible values: - Boolean: True if the row is a header row. False otherwise.
- Integer: wk true wk false wk mixed
Only one of the first five rows of a table can be set to True (see Repeated headers). If the value is set to True for a row, the attribute is set to True for all the preceding rows. If the value is set to False for a row, it is also set to False for all the following rows. |
wk page break inside row | Controls the automatic page break feature inside table rows. It applies: - to all the rows inside the target
- to the parent rows when the target is a text range or a cell range
If this option is applied to a table, it is actually applied to the rows of the table, not the table itself. This option is not taken into account if wk page break inside table is set to wk avoid. Possible values: - wk auto (default): a row may be split in two parts when the content of any cell (of the row) does not fit in the page when a physical page break occurs
- wk avoid: table rows are never split
- wk mixed when reading the attribute
Compatibility note: for documents created with versions lower than v19 R4, the value for each row is set to wk avoid. |
wk row count | (Read-only attribute) Total number of rows. Value type: Longint |
wk table | (Read-only attribute) The parent table. Value type: Object |
wk table ID | (Read-only attribute) ID of the parent table. Value type: String |
Section and subsection attributes handle specific section parameters (generic layout parameters also apply to sections and subsections, see Layout above). They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | | | | | | | | |
Note: Default values for column, padding, border and background attributes are inherited from the parent object:
- for sections, they are based upon document values;
- for subsections, they are based upon parent section values if attributes are overridden for the parent section, otherwise document values.
Constant | Comment |
---|
wk end | (Read-only attribute)
- Range end offset, or
- Section or subsection text end index in the document body (for subsection, text end index of the parent section).
Value type: Longint |
wk owner | (Read-only attribute) Owner of the range/object/section/subsection (reference to the document for section/subsection). Value type: Object |
wk parent | (Read-only subsection attribute) Parent section of the subsection. Value type: object (section reference). |
wk section index | (Read-only section or subsection attribute) Index of the section. Possible values: any integer value >=1 |
wk section name | Section user name, used to display section name in menus or in the document view (Read-only with subsections). Possible values: String (default is '', which means default display name will be used). |
wk start | (Read-only attribute)
- Range start offset, or
- Section or subsection text start index in the document body (for subsection, text start index of the parent section).
Value type: Longint |
wk type | (Read-only attribute) Type of 4D Write Pro object. Possible values: - wk type default: Range or section with not defined type
- wk type paragraph: Paragraph type range
- wk type image: Image (anchored and inline)
- wk type container: Header or footer, for instance
- wk type table: Table reference
For ranges of cells, columns and rows only: - wk type table row: Table row reference
- wk type table cell: Table cell reference
- wk type table column: Table column reference
For subsections only: - wk first page: First page subsection
- wk right page: Right page subsection
- wk left page: Left page subsection
|
Style sheet attributes are used to apply existing style sheet objects to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | X** | X* | X* | | | | |
*Read-only for text boxes, headers and footers, they are managed by 4D Write Pro (there is one style sheet by section header or footer).
**Inline pictures only.
Constant | Comment |
---|
wk new line style sheet | Specifies style sheet to use when adding a new line in the paragraph. Possible values:
- existing style sheet name
- wk none (default)
|
wk style sheet | Specifies current style sheet for the selected element(s). Possible values:
- wk none (default)
- existing style sheet name
|
For information about creating style sheet objects and defining the attributes within them, see Style sheet commands.
Table attributes are specific to tables. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | X | | | | | | | |
Constant | Comment |
---|
wk bottom carry over row | Specifies if carry-over rows must be repeated at the bottom of each page/column of a split datasource table but on the last page/column in value display mode (the carry-over row must be created in the table template, see Carry-over rows). Available values: - true: add carry-over rows at the bottom of split tables
- false (default): do not add carry-over rows at the bottom of split tables
This feature is only available with tables filled by datasources returning a non-empty collections or entity selections. In any other context, the bottom carry-over row, if designed, is rendered as a regular row. Note: Carry-over rows are not rendered in Embedded view mode. |
wk break formula | 4D formula object to use for the sort break row (usually a formula based on an item property like "This.item.name" in order to make sure the value changes and therefore the break row is generated). |
wk cell count | Total number of cells in the row. Value type: Longint (value for wk type table row) |
wk column count | (Read-only attribute) Total number of columns in the table. Value type: Longint |
wk datasource | Specifies the datasource for the table. Possible values: - formula object: the table is associated with a datasource. If the formula returns a non-empty entity selection or collection, rows are duplicated from the template row and automatically filled with data from entities or collection elements (see Table datasource). Otherwise, rows are standard.
- null: the table is not associated with a datasource (standard table).
|
wk empty datasource | Defines how the table is displayed when its datasource is empty. This attribute has no effect if the table is not linked to a datasource. Possible values: - wk show data row: Default value. Displays the data row and the break rows (if any) in addition to the headers and extra rows .
- wk hide data row : Hides the data row and the break rows (if any have been defined), the headers and extra rows are still displayed.
- wk show placeholder row : Displays a placeholder row instead of the data row and break rows (if any), the headers and extra rows are still displayed. The placeholder row follows the bottom carry-over row in references display mode.
- wk hide table: Hides the complete table.
Note: the table is also not displayed when the datasource is empty or NULL and the wk hide data row option is set and there is no header(s) nor extra rows. |
wk first column | (Read-only attribute) Number of the first table column included in the range. Value type: Longint |
wk first row | (Read-only attribute) Number of the first table row included in the range. Value type: Longint |
wk header row count | (Read/Write) Number of rows of the table with the attribute wk header set to True. Maximum value is 5. If you pass a value above 5, wk header is set to True for the first five rows only (see Repeated headers). |
wk id | ID of the element (header, footer, body, paragraph, image, table, or row). Value type: String |
wk page break inside table | Sets whether a table can be split between two rows when it is larger than the page. It applies: - to all the tables inside the target (document, section, table range or element)
- by extension, to the parent table(s) when the target is a text range, a row range, or a cell range
Possible values: - wk auto (default): no constraints regarding page breaks inside the table
- wk avoid: prevents table from being broken between two rows (when possible)
- wk mixed when reading the attribute
|
wk row count | (Read-only attribute) Total number of rows. Value type: Longint |
wk table align | Specifies horizontal alignment for a table. Possible values:
- wk left (default)
- wk right
- wk center
|
When different attributes are applied to concurrent elements of a table, a priority order is applied for the rendering:
- Table is rendered first
- Rows are rendered (overriding table attributes)
- Cells/Columns are rendered (overriding row attributes).
Text box
Text box attributes are used to handle text boxes inserted or added in the area. They can be applied to the following 4D Write Pro targets:
Documents | Sections | Paragraphs | Pictures | Tables | Rows | Column/Cells | Headers/Footers/Body | Text boxes |
---|
X | | | | | | | | |
Constant | Comment |
---|
wk anchor horizontal align | Defines the horizontal alignment of an image or a text box relative to the origin (see wk anchor origin). Possible values: - wk left - left align
- wk center - center align (not compatible with HTML, images are not displayed on the web)
- wk right - right align
|
wk anchor horizontal offset | Defines the horizontal offset of an image or a text box expressed in a CSS dimension string or longint (cm or pt or pixel) from wk layout unit. Possible values: - Left or right limit of the page relative to the wk anchor horizontal align
- Left or right limit of body in embedded mode (if wk anchor section = wk anchor embedded)
Default value = 0. |
wk anchor layout | Defines the layout position of an image or a text box relative to the text on a page. Possible values: - wk behind text - image or text box is anchored, behind the text
- wk in front of text - image or text box is anchored, in front of the text
- wk text wrap top bottom - image or text box is anchored with text wrapped above and below the image or text box with empty sides to its left and right
- wk text wrap square - image or text box is anchored with text wrapped all around the imagine or text box
- wk text wrap square left - image or text box is anchored with text wrapped on the left of the image or text box
- wk text wrap square right - image or text box is anchored with text wrapped on the right of the image or text box
- wk text wrap square largest - image or text box is anchored with text wrapped on the largest side of the image or text box
- wk inline with text - image is inline with text (default for images inserted with WP INSERT PICTURE). Not available for text boxes. Read-only attribute (inline pictures cannot be converted to anchored pictures by programming).
|
wk anchor origin | Defines if image or text box is anchored to the page, header or footer. Possible values: - wk paper box (default) - image or text box is anchored to the edge of the page
- wk header box - image or text box is anchored to the document header. If the header is not visible, image or text box is not displayed.
- wk footer box - image or text box is anchored to the document footer. If the footer is not visible, image or text box is not displayed.
This selector is ignored in embedded mode. |
wk anchor page | Defines the page index or the type of page an image or a text box is anchored to. Possible values: - wk anchor all - anchors an image or a text box to all pages of the section(s) defined by wk anchor section
- wk anchor first page - anchors an image or a text box to the first page subsection of the section(s) defined by wk anchor section
- wk anchor left page - anchors an image or a text box to the left pages subsection of the section(s) defined by wk anchor section
- wk anchor right page - anchors an image or a text box to the right pages subsection of the section(s) defined by wk anchor section
- a number (Longint >= 0) indicating which page to anchor the image or text box to. In this case, wk anchor section = wk anchor all. Section anchoring is ignored if an image or a text box is anchored to a single page.
Note: Images and Text boxes in Page mode are not displayed in browsers. |
wk anchor section | Defines the section index or the type of section that an image or a text box is anchored to. Possible values: - wk anchor all (default) - anchors an image or a text box to all sections in a document (image or text box is only visible in page mode)
- wk anchor embedded - anchors an image or a text box to the document body in embedded mode (image or text box is only visible in embedded mode)
- a number (Longint >= 1) indicating the section to anchor the image or text box to (image or text box is only visible in page mode).
Note: Images or text boxes in Page mode are not displayed in browsers. |
wk anchor vertical align | Defines the vertical alignment of an image or a text box relative to the origin (see wk anchor origin). Possible values: - wk top - top align
- wk center - middle align (not compatible with HTML, images are not displayed in browsers)
- wk bottom - bottom align
|
wk anchor vertical offset | Defines the vertical postion of an image or a text box expressed in a CSS dimension string or number (cm or pt or pixel). Possible values: - Top, center or bottom limit of the page (see wk anchor origin) or
- Top, center or bottom limit of body in embedded mode (if wk anchor section = wk anchor embedded).
Default value = 0. |
wk id | ID of the element (header, footer, body, paragraph, image, text box, table, or row). Value type: String Note: The ID cannot be empty for a text box. |
wk owner | (Read-only attribute) Owner of the range/object/section/subsection (reference to the document for section/subsection). Value type: Object |
wk protected | Defines the read/write protection status for a 4D Write Pro target (excluding style sheets). Possible values: - wk true - The target is defined as protected and cannot be modified when global protection is enabled.
- wk false - The target is not protected. (default)
- wk mixed - (Range targets only). Part of the target is defined as protected. The protected part cannot be modified when global protection is enabled.
Note: Changing the protection status of a parent target will also change the status of any of the target's children. |
wk style sheet | Specifies current style sheet for the selected element(s). Possible values:
- wk none (default)
- existing style sheet name
|
wk type | Type of 4D Write Pro object. Possible values: - wk type default: Range or section with not defined type
- wk type character: Character type
- wk type paragraph: Paragraph type range
- wk type image: Image (anchored and inline)
- wk type container: Header or footer, for instance
- wk type table: Table reference
- wk type text box: Text box
For ranges of cells, columns and rows only: - wk type table row: Table row reference
- wk type table cell: Table cell reference
- wk type table column: Table column reference
For subsections only: - wk first page: First page subsection
- wk right page: Right page subsection
- wk left page: Left page subsection
For tabs only, value used in the object for wk tab default or the objects of the collection for wk tabs: - wk left: Aligns tab to the left
- wk right: Aligns tab to the right
- wk center: Aligns tab to the center
- wk decimal: Aligns tab on the decimal
- wk bar: Inserts vertical bar at tab position
|
wk vertical align | Sets vertical alignment of an element. Can be used with characters, paragraphs, pictures, text boxes, tables, table rows, and table columns/cells. Cannot be used with sections or subsections. Possible values: - wk baseline: aligns baseline of element with baseline of parent element
- wk top: aligns top of element with top of tallest element on the line
- wk bottom: aligns bottom of element with lowest element on the line
- wk middle: element is placed in middle of parent element
- wk superscript: aligns element as if it were superscript
- wk subscript: aligns element as if it were subscript
For characters, wk top and wk bottom have the same effect as wk baseline. For paragraphs, wk baseline, wk superscript and wk subscript have the same effect as wk top. For tables, table rows, and table columns/cells, only wk top, wk bottom and wk middle values are supported. |