The Cleanup DOCX workflow action prepares a Word document for conversion by removing unnecessary formatting and white space. The Cleanup stylesheet you supply in the Resources field defines the operations it runs.
When your administrator adds a Cleanup workflow in Typefi Orion Compass, Cleanup in Typefi Orion for Microsoft Word runs as a server-side job using this action.
| Field | Description |
|---|---|
| Input | The input DOCX file. Click the Choose File icon and choose a file from the pop-up menu, or enter the filename; for example, Input/my-input.docx. |
| Output | The output DOCX file. Click the Choose File icon and choose a file from the pop-up menu, or enter the filename. The default output name is output-1.docx. |
| Resources | The XZIP file containing the Cleanup stylesheet package to run. Click Choose File and choose a file from the pop-up menu. Alternatively, enter the filename, for example Transforms/orion-cleanup-docx-v2.2-2026-10-09T2047.xzip. |
| Settings | A JSON object of cleanup settings. If this field is empty, Cleanup DOCX uses the settings saved in the document, or the publication's settings if the document has none. Settings you enter here replace the document's settings. |
You can also use workflow variables to specify input fields. To insert a workflow variable, click the lightning bolt icon and choose a variable from the pop-up menu.
Settings
The Settings field accepts a JSON object that controls which cleanup operations run. The available settings are defined by the Cleanup stylesheet. For what each setting does, see Set up Cleanup in Typefi Orion Compass.
If Settings is empty, Cleanup DOCX uses the cleanup settings saved in the document, or the publication's cleanup settings if the document has none. If no settings are found, the job fails with a message that explains where to add them.
Settings provided on the workflow step replace any settings saved in the document. An empty JSON object ({}) is not valid. If you provide Settings, at least one setting must be set.
Example:
{"commentsBookmarksHiddenText": {"removeWordComments": true}}
Graphics export
When the cleanup settings remove or extract graphics, Cleanup DOCX replaces each picture with the replacement text from the settings, for example [INSERT FIGURE 001]. When graphics are extracted, it also copies each image, unchanged, into a graphics folder in the job folder.
Stylesheet messages
Messages the Cleanup stylesheet outputs using <xsl:message> appear in the job log. To label each entry with a severity level, start the message with a prefix:
| Prefix | Log level |
|---|---|
[DEBUG] or [TRACE]
|
Debug |
[INFO] |
Info |
[WARN] |
Warning |
[ERROR] or [FATAL]
|
Error |
Cleanup DOCX logs messages without a recognised prefix at the Info level. A message starting with [ERROR] or [FATAL] stops the job.
Comments
0 comments
Please sign in to leave a comment.