IdPrefix

HtmlFixedSaveOptions.IdPrefix property

Specifies a prefix that is prepended to all generated element IDs in the output document. Default value is null and no prefix is prepended.

public string IdPrefix { get; set; }

Exceptions

exceptioncondition
ArgumentExceptionThe value does not meet the requirements specified above.

Remarks

If the prefix is specified, it can contain only letters, digits, underscores, and hyphens, and must start with a letter.

Examples

Shows how to add a prefix that is prepended to all generated element IDs.

Document doc = new Document(MyDir + "Id prefix.docx");

HtmlFixedSaveOptions saveOptions = new HtmlFixedSaveOptions();
saveOptions.IdPrefix = "pfx1_";

doc.Save(ArtifactsDir + "HtmlFixedSaveOptions.IdPrefix.html", saveOptions);

See Also