FME Transformers: 2024.2
FME Transformers: 2024.2
MSWordStyler
Prepares features for output to the Microsoft Word Writer by providing a convenient interface to set a variety of Microsoft Word format-specific attributes.
For more information regarding Microsoft Word styling, see the Microsoft Word Writer chapter in the FME Readers and Writers help. (In FME Workbench, select Help > FME Readers and Writers.)
Configuration
Parameters
General
Content Type |
This parameter specifies what kind of Microsoft Word content this feature will add into a document. Based on this parameter the rest of the parameter dialog will change. Format attribute set: msword_type |
Heading
In Microsoft Word, headings separate a document into collapsible sections. While editing a document in Microsoft Word, if you hover over heading text, an arrow will appear to the left of it allowing you to collapse its section.
Text |
This parameter controls what text the heading will show Format attribute set: msword_heading_text |
Heading Level |
Headings have different levels. Example: Heading 3 is a subheading of Heading 2, and if you collapse a heading of heading level 2, the entire document under it until the next heading level 2 or heading level 1 will be hidden, even if there are headings of level 3 or greater among the hidden text. Title is technically not a heading at all, but just some stylized text. Format attribute set: msword_heading_level |
Image
Image Source |
Image Source has two options: From File and From Feature. If From File is selected, then the Image Filename parameter is used to select a file. If From Feature is selected, then the styled feature must have a raster geometry. Its raster geometry is written to the Microsoft Word document. Format attribute set: msword_image_source |
Image Filename |
Specifies the path to the desired image. To browse your file system for an image, click the browse button to the right of the text field. This parameter is only enabled if Image Source is From File Format attribute set: msword_image_filename |
Alignment |
Sets the image alignment. Format attribute set: msword_justification |
Width Units |
This in conjunction with Image Width specifies how large to scale the image. If Percentage of Page Width is chosen, then it means the percent of page within the left and right margins. It is possible to extend past the margins given a large enough width. Format attribute set: msword_measurement_units |
Image Width |
This in conjunction with Width Units specifies how large to scale the image. If Percentage of Page Width was chosen for Width Units, then 100 means the entire page width, while 1 means only one percent. Format attribute set: msword_image_width |
List Item
Text |
The text to be placed. Format attribute set: msword_bullet_text |
||||||||||||||||||||
Indent Level |
How much indent to place left of the list item. In Microsoft Word, this correlates to starting a list, then pressing tab either zero, one, or two times. The positions of each indent level are customizable in Word if you have Ruler enabled through View on Microsoft Word’s ribbon. If the list is a numbered list, and the indent level changes, then the list item counter will reset to 1. Format attribute set: msword_bullet_indent |
||||||||||||||||||||
List Type |
A list can either be Numbered, or Bulleted. A bulleted list always has a black dot to the left of each list item. A numbered list counts 1,2,3,… to the left of each list item. Format attribute set: msword_bullet_ordered |
||||||||||||||||||||
Font |
The font name, size, and styling properties. To edit this parameter, click the browse button to the right of the text field. Format attribute set: msword_font_name Format attribute set: msword_font_size Format attribute set: msword_font_bold Format attribute set: msword_font_italic Format attribute set: msword_font_underline Format attribute set: msword_font_strikethrough |
||||||||||||||||||||
Font Color |
The color of the text foreground for this list item. Specifying Colors Colors may be entered directly or chosen from the color picker via the ellipsis button. Syntax
Colors can be specified by RGB values or hex codes. RGB values may be either 24-bit or decimal (0 - 1). If the value type is unclear, as in (1,1,1), the 24-bit interpretation is used. Hex codes are accepted with or without a hash sign (#).
Format attribute set: msword_font_color |
Page Break
Number of Page Breaks |
This parameter specifies how many page breaks will be added to the document. Example: Three page breaks will skip to the next page, then add two empty pages, bringing about either 3 empty pages, or two empty pages and a partially empty page. Format attribute set: msword_break_count |
Paragraph
Style |
Several preset styles exist for the paragraph's typeface, font size, color, etc. Selecting Custom will enable the Font and Font Color parameters. Format attribute set: msword_paragraph_style |
||||||||||||||||||||
Use Markdown |
Specifies to apply a simplistic markdown to the paragraph for bolding, italicizing, and underlining. If the font is set to bold, then the markdown will instead indicate where text should NOT be bolded. The same applies to italicizing and underlining. If a section of text is surrounded by doubles asterisks (**text**) then the section will be bolded. If a section of text is surrounded by double tildes (~~text~~) then the section will be italicized. If a section of text is surrounded by double underscores (__text__) then the section will be underlined. If either end of the section has any whitespace, the section will NOT be styled (** bold** has no effect). If a section is empty (****) there will be no effect. These effects can be used in conjunction (**~~bolded and italicized~~**). It’s important that the sections to not intersect each other (**~~a**~~ will not work properly.) The leftmost pattern matches will take precedence. (**left**right**) will bold left but not right. If an asterisk, tilde, or underscore is not part of a valid pattern match, that character will be left in the text to be placed. If any of those characters were part of a valid pattern match, they will not be visible in the text to be placed. Format attribute set: msword_use_markdown |
||||||||||||||||||||
Text |
The text to place, in a separate paragraph. Format attribute set: msword_paragraph_text |
||||||||||||||||||||
Font |
The font name, size, and styling properties. To edit this parameter, click the browse button to the right of the text field. Format attribute set: msword_font_name Format attribute set: msword_font_size Format attribute set: msword_font_bold Format attribute set: msword_font_italic Format attribute set: msword_font_underline Format attribute set: msword_font_strikethrough |
||||||||||||||||||||
Font Color |
The color of the text foreground for this list item. Specifying Colors Colors may be entered directly or chosen from the color picker via the ellipsis button. Syntax
Colors can be specified by RGB values or hex codes. RGB values may be either 24-bit or decimal (0 - 1). If the value type is unclear, as in (1,1,1), the 24-bit interpretation is used. Hex codes are accepted with or without a hash sign (#).
Format attribute set: msword_font_color |
||||||||||||||||||||
Alignment |
Sets the text justification Format attribute set: msword_justification |
Table
Table Style |
These styles match what is shown in Microsoft Word’s ribbon under the design tab while editing a table. They modify the table’s appearance. Format attribute set: msword_table_style |
||||||||||||||||||||
Width Units |
Specifies what units will be used when specifying column widths. If Percentage of Page Width is chosen, then it means the percent of page within the left and right margins. It is possible to extend past the margins given a large enough width. Format attribute set: msword_measurement_units |
||||||||||||||||||||
Font |
The font name, size, and styling properties. To edit this parameter, click the browse button to the right of the text field. Format attribute set: msword_font_name Format attribute set: msword_font_size Format attribute set: msword_font_bold Format attribute set: msword_font_italic Format attribute set: msword_font_underline Format attribute set: msword_font_strikethrough |
||||||||||||||||||||
Font Color |
The color of the text foreground for this item. Specifying Colors Colors may be entered directly or chosen from the color picker via the ellipsis button. Syntax
Colors can be specified by RGB values or hex codes. RGB values may be either 24-bit or decimal (0 - 1). If the value type is unclear, as in (1,1,1), the 24-bit interpretation is used. Hex codes are accepted with or without a hash sign (#).
Format attribute set: msword_font_color |
Table Data
Column Header |
The header text for the particular column. Format attribute set: msword_table_col_header |
Column Values |
The text value to place in a row under the particular column. Format attribute set: msword_table_col_value |
Column Width |
In conjunction with Width Units this sets the particular column’s width. Any positive number is valid here, or the word Stretch. Columns with the width Stretch will all share any leftover space after columns with specified sizes are given their space. If Percentage of Page Width was chosen for Width Units, then 100 means the entire page width, while 1 means only one percent. Format attribute set: msword_table_col_width |
Editing Transformer Parameters
Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.
How to Set Parameter Values
Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.
Content Types
These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |
Dialog Options - Tables
Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the MSWordStyler on the FME Community.