Top Method Summary
Options Name Purpose
Append (character) Appends the given value to the output buffer
AppendLongchar (longchar) Appends the given longchar value to the output
Flush () Flushes the output buffer into the longchar result
LONGCHAR Write (TextDocument) Writes the given TextDocument out as plain text
WriteBlockPrefix (TextDocument) Writes the prefix of the block that is being written
WriteIndent (TextDocument) Writes the indentation of the block that is being written
WriteRuns (TextDocument) Writes the runs of the block the given document is positioned on
WriteTextRun (TextDocument) Writes a single text run

Top Constructor Summary
Options Name Purpose
PlainTextWriter () Creates a new PlainTextWriter instance


Method Detail
Top

Append (character)

Purpose: Appends the given value to the output buffer
Notes: Flushes the buffer into the result first when the value would
take it past the CHARACTER limit

Parameters:
pcValue CHARACTER
The value to append
Top

AppendLongchar (longchar)

Purpose: Appends the given longchar value to the output
Notes: A run can be longer than the CHARACTER limit on its own, so
the buffer is flushed and the value is appended to the
LONGCHAR result directly

Parameters:
plcValue LONGCHAR
The value to append
Top

Flush ()

Purpose: Flushes the output buffer into the longchar result
Notes:

Top

LONGCHAR Write (TextDocument)

Purpose: Writes the given TextDocument out as plain text
Notes: An empty document yields an empty value, never the unknown value

Parameters:
poDocument Consultingwerk.Util.DocumentConverter.TextDocument
The TextDocument to write out
Returns LONGCHAR
The longchar with the plain text representation
Top

WriteBlockPrefix (TextDocument)

Purpose: Writes the prefix of the block that is being written
Notes: The indentation of the block first, four blanks per level
(SCL-5856) - the width a quoted or indented passage is set in
in plain text, and wide enough not to be mistaken for the two
blanks per level a nested list item carries. Then the bullet
or the number of a list item; every other block kind carries
nothing else.

Parameters:
poDocument Consultingwerk.Util.DocumentConverter.TextDocument
The TextDocument positioned on the block to write
Top

WriteIndent (TextDocument)

Purpose: Writes the indentation of the block that is being written
Notes: Written at the start of every line of the block, which is the
block itself and every line a line break run opens, so that an
indented passage of several lines keeps its shape

Parameters:
poDocument Consultingwerk.Util.DocumentConverter.TextDocument
The TextDocument positioned on the block to write
Top

WriteRuns (TextDocument)

Purpose: Writes the runs of the block the given document is positioned on
Notes: Image runs are dropped, a line break becomes a line ending

Parameters:
poDocument Consultingwerk.Util.DocumentConverter.TextDocument
The TextDocument positioned on the block to write
Top

WriteTextRun (TextDocument)

Purpose: Writes a single text run
Notes: A hyperlink whose text differs from its URL keeps the URL in
brackets behind the text, so that the target is not lost

Parameters:
poDocument Consultingwerk.Util.DocumentConverter.TextDocument
The TextDocument positioned on the run to write


Constructor Detail
Top

PlainTextWriter ()

Purpose: Creates a new PlainTextWriter instance
Notes: The result is fixed to UTF-8 here rather than in Write, because
FIX-CODEPAGE can only be applied to a LONGCHAR that has no
value yet. Without it the result would take the session code
page and every character outside it - the Euro sign, an emoji -
would raise "LONGCHAR conversion error (11682)" on append.



©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       19.09.2026 10:19:20