RewriteContent(ContentEditor) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Runs the page's content through editor and, when it made edits, replaces the content with the result: one stream in which every byte the edits did not touch is as it was.

public bool RewriteContent(ContentEditor editor)

Parameters

editor
ContentEditor

The editor; it numbers the operators and makes its edits during the run.

Returns

Boolean
true when the editor made edits and the content was replaced; otherwise the page is unchanged.

Remarks

ISO 32000-2 §7.8.2; Table 31. The run is the one ProcessContent(ContentProcessor) makes. The result is written unfiltered (§7.3.8.2; a save compresses it) into a new stream (§7.3.10, AddObject(CosObject)) that the page's Contents then names alone; a Contents array's parts are joined by line feeds. The old streams are not written into, so another page that shows them keeps its content; they stay objects of the document, which a save with RemoveUnreachableObjects drops when nothing else refers to them.