CommentDisplayMode

CommentDisplayMode enumeration

Gibt den Rendering-Modus für Dokumentkommentare an.

public enum CommentDisplayMode

Werte

NameWertBeschreibung
Hide0Es werden keine Dokumentkommentare gerendert.
ShowInBalloons1Dokumentkommentare werden in Sprechblasen am Rand angezeigt. Dies ist der Standardwert.
ShowInAnnotations2Stellt Dokumentkommentare in Anmerkungen dar. Dies ist nur im PDF-Format verfügbar.

Beispiele

Zeigt, wie Kommentare beim Speichern eines Dokuments in einem gerenderten Format angezeigt werden.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.Write("Hello world!");

Comment comment = new Comment(doc, "John Doe", "J.D.", DateTime.Now);
comment.SetText("My comment.");
builder.CurrentParagraph.AppendChild(comment);

// ShowInAnnotations ist nur in den Formaten Pdf1.7 und Pdf1.5 verfügbar.
// In anderen Formaten funktioniert es ähnlich wie „Ausblenden“.
doc.LayoutOptions.CommentDisplayMode = CommentDisplayMode.ShowInAnnotations;

doc.Save(ArtifactsDir + "Document.ShowCommentsInAnnotations.pdf");

// Beachten Sie, dass das Seitenlayout des Dokuments neu erstellt werden muss (über die Methode Document.UpdatePageLayout()).
// nach dem Ändern der Document.LayoutOptions-Werte.
doc.LayoutOptions.CommentDisplayMode = CommentDisplayMode.ShowInBalloons;
doc.UpdatePageLayout();

doc.Save(ArtifactsDir + "Document.ShowCommentsInBalloons.pdf");

Siehe auch