4D v17.4

4D Write Pro

Home

 
4D v17.4
4D Write Pro

4D Write Pro 

 

For more information, please refer to the 4D Write Pro Language section.  

Constant Type Value Comment
wk 4D Write Pro layout Longint 0 Standard 4D Write Pro layout, which can include some specific style attributes
wk 4wp Longint 4 4D Write Pro document is saved in a native archive format (zipped HTML and images saved in a separate folder). 4D specific tags are included and 4D expressions are not computed. This format is particularly suitable for saving and archiving 4D Write Pro documents on disk without any loss.
wk anchor all Longint -1 Image anchor value for wk anchor section and wk anchor page
wk anchor embedded Longint -2 Image anchor value for wk anchor section
wk anchor first page Longint -2 Image anchor value for wk anchor page
wk anchor horizontal align String anchorHorizontalAlign Defines the horizontal alignment of an image 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 String anchorHorizontalOffset Defines the horizontal offset of an image 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 String anchorLayout Defines the layout position of an image relative to the text on a page. Possible values:
  • wk behind text - image is anchored, behind the text
  • wk in front of text - image is anchored, in front of the text
  • wk inline with text - image is inline with text (default for images inserted with WP INSERT PICTURE). Read-only attribute (inline pictures cannot be converted to anchored pictures by programming)
wk anchor left page Longint -3 Image anchor value for wk anchor page
wk anchor origin String anchorOrigin Defines if image is anchored to the page, header or footer. Possible values:
  • wk paper box (default) - image is anchored to the edge of the page
  • wk header box - image is anchored to the document header. If the header is not visible, image is not displayed.
  • wk footer box - image is anchored to the document footer. If the footer is not visible, image is not displayed.
This selector is ignored in embedded mode.
wk anchor page String anchorPage

Defines the page index or the type of page an image is anchored to. Possible values:

  • wk anchor all - anchors an image to all pages of the section(s) defined by wk anchor section
  • wk anchor embedded - anchors an image to the document body in embedded mode (image is only visible in embedded mode)
  • wk anchor first page - anchors an image to the first page subsection of the section(s) defined by wk anchor section
  • wk anchor left page - anchors an image to the left pages subsection of the section(s) defined by wk anchor section
  • wk anchor right page - anchors an image 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 to. In this case, wk anchor section = wk anchor all. Section anchoring is ignored if an image is anchored to a single page.

Note: Images in Page mode are not displayed in browsers.

wk anchor right page Longint -4 Image anchor value for wk anchor page
wk anchor section String anchorSection Defines the section index or the type of section that an image is anchored to. Possible values:
  • wk anchor all (default) - anchors an image to all sections in a document (image is only visible in page mode)
  • wk anchor embedded - anchors an image to the document body in embedded mode (image is only visible in embedded mode)
  • a number (Longint >= 1) indicating the section to anchor the image to. (image is only visible in page mode)

Note: Images in Page mode are not displayed in browsers.

wk anchor vertical align String anchorVerticalAlign Defines the vertical alignment of an image 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 String anchorVerticalOffset Defines the vertical postion of an image 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 append Longint 2 Insert contents at end of target
wk armenian Longint 19 Traditional Armenian numbering style used (value for wk list style type)
wk author String author Specifies name of author of the document (string)
wk auto Longint 0 Value of property (constant) to which it is applied is adjusted automatically according to content or context of the element.
wk background clip String backgroundClip 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 String backgroundColor

Specifies background color of an element. Possible values:

  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET COLOR 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 height String backgroundHeight 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 String backgroundImage 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 String backgroundImageURL 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 String backgroundOrigin 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 String backgroundPositionHorizontal 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 String backgroundPositionVertical 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 String backgroundRepeat 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 String backgroundWidth 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.
wk bar Longint 4

Inserts a vertical bar at tab position (value for wk tab stop types)

wk baseline Longint 4 Aligns baseline of element with baseline of parent element (value for wk vertical align)
wk behind text Longint 0 value for wk anchor layout
wk body Longint 0 Body frame of the section
wk border box Longint 0 Background is clipped to the border box (value for wk background clip)
wk border color String borderColor Sets color of all four borders. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET 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 String borderColorBottom 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 COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk border color left String borderColorLeft 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 COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk border color right String borderColorRight 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 COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk border color top String borderColorTop 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 COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk border radius String borderRadius 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 String borderStyle 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 String borderStyleBottom 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 String borderStyleLeft 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 String borderStyleRight 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 String borderStyleTop 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 String borderWidth 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 String borderWidthBottom 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 String borderWidthLeft 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 String borderWidthRight 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 String borderWidthTop 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 bottom Longint 1 Sets position of background image (value for wk background position v) or bottom of element aligned with lowest element on line (value for wk vertical align)
wk capitalize Longint 1 Transforms first character of every word to uppercase (value for wk text transform)
wk cell count String cellCount Total number of cells in the row. Value type: Longint (value for wk type table row)
wk center Longint 2

Centers text or image (value for wk background position h, wk text align, and/or wk tab stop types)

wk circle Longint 11 Circle-shaped glyph used (value for wk list style type)
wk cjk ideographic Longint 24 Plain ideographic numbers used (value for wk list style type)
wk club Longint 27 Club-shaped glyph used (value for wk list style type)
wk column break Longint 3 Column break: inserts a column break
wk column count String columnCount (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 String columnRuleColor 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 COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk column rule style String columnRuleStyle 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 String columnRuleWidth 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 String columnSpacing (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 String columnWidth (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 company String company Specifies a company associated with the document (string)
wk contain Longint -1 Scales image to largest size such that its width and height fits inside content area (value for wk background size h and/or wk background size v)
wk content box Longint 2 Background clipped to content box (value for wk background clip) or background image starts from upper left corner of content (value for wk background origin)
wk cover Longint -2 Scales background image to smallest size so that background area is completely covered by it (value for wk background size h and/or wk background size v)
wk current page footer Longint 2
wk current page header Longint 1
wk current section default footer Longint 10 Default footer of the section (available only if there is no active subsection footer)
wk current section default header Longint 9 Default header of the section (available only if there is no active subsection header)
wk current section first footer Longint 4 Footer of the first page of the section
wk current section first header Longint 3 Header of the first page of the section
wk current section left footer Longint 6 Footer of the left page(s) of the section
wk current section left header Longint 5 Header of the left page(s) of the section
wk current section right footer Longint 8 Footer of the right page(s) of the section
wk current section right header Longint 7 Header of the right page(s) of the section
wk custom Longint 29 Custom marker used (value for wk list style type)
wk dashed Longint 3 Dashed line used (value for wk text linethrough style and/or wk text underline style)
wk date creation String dateCreation Returns creation date of document (date). This value is read-only and cannot be set.
wk date modified String dateModified

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 debug format Longint 1

Formatted HTML code ("pretty print"), easier to debug

wk decimal Longint 3

Decimal alignment (value for wk tab stop types) or numbers used (value for wk list style type)

wk decimal greek Longint 28 Greek numerals used (value for wk list style type)
wk decimal leading zero Longint 13 Decimal numbers padded with initial zeros used (value for wk list style type)
wk default Longint -1 Default value of property (constant) is used.
wk diamond Longint 26 Diamond-shaped glyph used (value for wk list style type)
wk direction String direction Specifies text direction of paragraph. Possible values:
  • wk left to right (default)
  • wk right to left
wk disc Longint 10 Filled circle marker used (value for wk list style type)
wk dotted Longint 2 Dotted line or border used (value for wk border style, wk text linethrough style and/or wk text underline style)
wk double Longint 4 Double line or border used (value for wk border style, wk text linethrough style and/or wk text underline style)
wk dpi String 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 end String 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 end text Longint 0 Sets end of document as end of text range
wk exclude from range Longint 1 Inserted contents not included in updated range
wk expressions as source Longint 1 The original string of 4D expression references is returned.
wk expressions as space Longint 2 Each reference is returned as a non-breaking space character.
wk expressions as value Longint 0 4D expression references are returned in their evaluated form. (default if option if not passed).
wk false Longint 0
wk first column String firstColumn (Read-only attribute) Number of the first table column included in the range. Value type: Longint
wk first page Longint 1
wk first row String firstRow (Read-only attribute) Number of the first table row included in the range. Value type: Longint
wk font String 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 String fontBold 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 family String fontFamily 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 String fontItalic 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 String fontSize 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 footer box Longint 1 Image anchor value for wk anchor origin 
wk freeze expressions Longint 64 Freeze expressions at the moment of the insertion
wk georgian Longint 20 Traditional Georgian numbering used (value for wk list style type)
wk groove Longint 6 3D grooved border used (value for wk border style)
wk header box Longint 0 Image anchor value for wk anchor origin
wk hebrew Longint 21 Traditional Hebrew numbering used (value for wk list style type)
wk height String 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 hidden Longint 5 No border used. Same as none (no border) except it takes precedence over all other conflicting borders (value for wk border style)
wk hiragana Longint 22 Traditional Hiragana numbering used (value for wk list style type)
wk hollow square Longint 25 Hollow square glyph used (value for wk list style type)
wk html wysiwyg Longint 1 In this layout, any 4D Write Pro advanced attributes which are not compliant with all browsers are removed (e.g. columns, double underlines...)
wk id String id ID of the element (header, footer, body, paragraph, image, table, or row). Value type: String
wk image String 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 String imageAlternateText Specifies alternative text for image, if image cannot be displayed.
wk image url String imageURL 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 in front of text Longint 1 Image layout value for wk anchor layout
wk include in range Longint 0 Inserted contents included in updated range (default)
wk inherit style from paragraph Longint 32 Inserted contents inherits character style from the paragraph default character style.
wk inline with text Longint -1 Image layout value for wk anchor layout
wk inset Longint 8 3D inset border used (value for wk border style)
wk inside String 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 justify Longint 5 Available for 4D Write Pro areas only
wk katakana Longint 23 Traditional Katakana numbering used (value for wk list style type)
wk keep paragraph styles Longint 128 Keep destination paragraph styles
wk layout unit String userUnit 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 left Longint 0

Aligns text or tab to the left (value for wk text align or wk tab stop types) or sets starting position of background image (value for wk background position h)

wk left page Longint 2
wk left to right Longint 0 Left-to-right text/writing direction used (value for wk direction)
wk line break Longint 0 Line break (in the same paragraph)
wk line height String lineHeight 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 link url String linkUrl 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
wk list auto Longint 2147483647 Restores/applies automatic list style values
wk list font String listFont 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 String listFontFamily 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 String listStartNumber 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 String listStringFormatLtr 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 String listStringFormatRtl 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 String listStyleImage 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 String listStyleImageHeight 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 String imageURL 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 String listStyleType 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
wk lower greek Longint 18 Lowercase classical Greek used (value for wk list style type)
wk lower latin Longint 14 Lowercase ASCII letters used (value for wk list style type)
wk lower roman Longint 15 Lowercase Roman numerals used (value for wk list style type)
wk lowercase Longint 2 Changes all characters to lowercase (value for wk text transform)
wk margin String 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 String marginBottom 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 String marginLeft 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 String marginRight 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 String marginTop 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 middle Longint 2 Sets position of background image (value for wk background position v) or places element in middle of parent element (value for wk vertical align)
wk mime html Longint 1 4D Write Pro document is saved as standard MIME HTML with HTML documents and images embedded as MIME parts (encoded in base64). Expressions are computed and 4D specific tags and method links are removed. This format is particularly suitable for sending HTML emails with the SMTP_QuickSend command.
wk min height String minHeight 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 String minWidth 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 mixed Longint -2147483648 Returned when there are different values for an attribute in the range or document
wk new line style sheet String newLineStyleSheet Specifies style sheet to use when adding a new line in the paragraph. Possible values:
  • existing style sheet name
  • wk none (default)
wk no repeat Longint 3 Background image will not be repeated (value for wk background repeat)
wk none Longint 0
wk normal Longint 0 Standard HTML code
wk notes String notes Specifies comments about the document (string).
wk outset Longint 9 3D outset border used (value for wk border style)
wk outside String 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 owner String owner (Read-only attribute) Owner of the range/object/section/subsection (reference to the document for section/subsection). Value type: Object
wk padding String 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 String paddingBottom 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 box Longint 1 Background clipped to padding box (value for wk background clip) or background image starts from upper left corner of padding edge (value for wk background origin)
wk padding left String paddingLeft 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 String paddingRight 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 String paddingTop 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
wk page break Longint 2 Page break: defines a new page
wk page height String pageHeight 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 paper box Longint 3 Background is painted to the paper edge (value for wk background clip) or image starts at the paper edge (value for wk background origin and wk anchor origin). For documents and sections only.
wk prepend Longint 1 Insert contents at beginning of target
wk repeat Longint 0 Background image repeated both vertically and horizontally (value for wk background repeat)
wk repeat x Longint 1 Background image repeated only horizontally (value for wk background repeat)
wk repeat y Longint 2 Background image repeated only vertically (value for wk background repeat)
wk replace Longint 0 Replace target contents
wk ridge Longint 7 3D ridged border used (value for wk border style)
wk right Longint 1

Aligns text or tab to the right (value for wk text align or wk tab stop types) or sets starting position of background image (value for wk background position h)

wk right page Longint 3
wk right to left Longint 1 Right-to-left direction used (value for wk direction)
wk row count String rowCount (Read-only attribute) Total number of rows. Value type: Longint
wk section break Longint 1 Section break: defines a new section
wk semi transparent Longint 5 Semi-transparent line used (value for wk text linethrough style and/or wk text underline style)
wk small uppercase Longint 4 Transforms all characters to small uppercase (value for wk text transform)
wk solid Longint 1 Solid line or border used (value for wk border style, wk text linethrough style and/or wk text underline style)
wk square Longint 12 Square marker used (value for wk list style type)
wk start String 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 start text Longint 1 Sets beginning of document as start of text range
wk style sheet String styleSheet Specifies current style sheet for the selected element(s). Possible values:
  • wk none (default)
  • existing style sheet name
wk subject String subject Specifies document subject (string)
wk subscript Longint 6 Aligns element as subscript (value for wk vertical align)
wk superscript Longint 5 Aligns element as superscript (value for wk vertical align)
wk tab stop leadings String tabStopLeadings

Specifies the leading characters for tabs in paragraph ranges.

Possible values:

  • Text array
    A list of leading character for each tab offset, starting from the left margin. The character defined by the last value is repeated for each additional tab entered in the paragraph.
  • Text
    A single character is used as the leading character. If more than one character is designated, only the first one will be used.

Synchronized with the wk tab stop offsets and wk tab stop types arrays. If the arrays do not match in size (and are not empty), the last character of the array is used as the default for the tabs. If the arrays are empty, the None character is used.

Note: The last character used is always the default character for tabs.

wk tab stop offsets String tabStopOffsets

Specifies tab stops for the paragraph. Possible values:

  • Array of tab values: an ordered list of absolute values, starting from the left margin. The last value is the default tab offset value (repeated for each additional tab character entered in the paragraph) and NOT an absolute tab position. If the tab offset is greater than the paragraph width, the text goes on the next line and starts from the first tab value. If a value in the array is smaller than the previous value, it is ignored (except for the last value in the array, which is a default offset).
  • Scalar value (default is 35.45pt): default offset for the whole paragraph. The WP GET ATTRIBUTES command returns the last offset (which is the default relative offset for offsets beyond the last absolute offset).

Note: You cannot use arrays and scalars in the same call for different attributes.

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 String tabStopTypes

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): text extends to the right from the tab stop
  • wk right: text extends to the left from the tab stop until the tab's space is filled
  • wk center: text is centered at the tab stop
  • wk decimal: text before the decimal point extends to the left, and text after the decimal point extends to the right
  • wk bar: a vertical line at the specified position

Synchronized with the wk tab stop offsets and wk tab stop leadings arrays.

wk table align String tableAlign Specifies horizontal alignment for a table. Possible values:
  • wk left (default)
  • wk right
  • wk center
wk table ID String tableID (Read-only attribute) ID of the parent table. Value type: String
wk text align String textAlign Specifies horizontal alignment of text in the paragraph. Possible values:
  • wk left (default)
  • wk right
  • wk justify
  • wk center
wk text color String 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 COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
wk text indent String textIndent 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 text linethrough color String textLinethroughColor Specifies color of text linethrough. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET 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 String textLinethroughStyle 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 String textShadowColor 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 COLOR command)
  • a longint array containing an element for each R, G, B component (0-255)
  • wk transparent (default)
wk text shadow offset String textShadowOffset Specifies offset for shadow effect. Possible values:
  • Size expressed in points. Default value: 1pt
wk text transform String textTransform 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 String textUnderlineColor Specifies color of text underline. Possible values:
  • a CSS color ("#010101" or "#FFFFFF" or "red").
  • a 4D color longint value (see OBJECT SET 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 String textUnderlineStyle 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 title String title Specifies document title (string). Default is "New 4D Write Pro Document"
wk top Longint 0 Sets position of background image (value for wk background position v) or aligns element with top of tallest element on the line (value for wk vertical align)
wk transparent Longint -1 Specifies color is transparent (value for wk background color or wk text shadow color)
wk true Longint 1
wk type String 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
wk type body Longint 8 Body reference (value for wk type)
wk type container Longint 3 Header or footer, for instance (value for wk type)
wk type default Longint 0 Default range type
wk type image Longint 2 Anchored and/or inline images
wk type image anchored Longint 200 Anchored image reference for document objects
wk type image inline Longint 100 Inline image reference for document objects
wk type paragraph Longint 1 Paragraph type range
wk type table Longint 4 Table reference
wk type table cell Longint 6 Table cell reference (value for wk type)
wk type table column Longint 7 Column reference - only for column range (value for wk type)
wk type table row Longint 5 Table row reference
wk unit cm String cm Unit used is centimeters (value for wk layout unit)
wk unit inch String in Unit used is inches (value for wk layout unit)
wk unit mm String mm Unit used is millimeters (value for wk layout unit)
wk unit percent String % Unit used is a percentage (value for wk layout unit)
wk unit pt String pt Unit used is points (value for wk layout unit)
wk unit px String px Unit used is pixels (value for wk layout unit)
wk upper latin Longint 16 Uppercase ASCII letters used (value for wk list style type)
wk upper roman Longint 17 Uppercase Roman numerals used (value for wk list style type)
wk uppercase Longint 3 Changes all characters to uppercase (value for wk text transform)
wk value unit not percentage Longint -100000 Returned to the WP GET ATTRIBUTES command when the current value unit is not percentage and you passed a string variable (result is invalid).
wk value unit percentage Longint -100001 Returned to the WP GET ATTRIBUTES command when the current value unit is percentage and you passed a numeric variable (result is invalid).
wk version String version Returns internal 4DWP version of the document (real). This number is only read using WP GET ATTRIBUTES; it cannot be set.
wk vertical align String verticalAlign Sets vertical alignment of an element. Can be used with characters, paragraphs, pictures, 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.
wk web page complete Longint 2 .htm or .html extension. Document is saved as standard HTML and its resources are saved separately. 4D tags and links to 4D methods are removed and expressions are computed. This format is particularly suitable when you want to display a 4D Write Pro document in a web browser.
wk web page html 4D Longint 3 4D Write Pro document is saved as HTML and includes 4D specific tags; each expression is inserted as a non-breaking space. Since this format is lossless, it is appropriate for storing purposes in a text field.
wk width String width Sets width of element. Possible values:
  • wk auto (default): width is based upon the contents of the element
  • 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.
 

wk word Longint 6 Underline words only (exclude blank spaces) (value for wk text linethrough style and/or wk text underline style)

 

 
PROPERTIES 

Product: 4D
Theme: List of constant themes

 
HISTORY 

Modified: 4D v15 R2

 
ARTICLE USAGE

4D Language Reference ( 4D v17)
4D Language Reference ( 4D v17.1)
4D Language Reference ( 4D v17.2)
4D Language Reference ( 4D v17.3)
4D Language Reference ( 4D v17.4)