CommentDisplayMode

CommentDisplayMode enumeration

Specifica la modalità di rendering per i commenti del documento.

public enum CommentDisplayMode

I valori

NomeValoreDescrizione
Hide0Nessun commento al documento viene visualizzato.
ShowInBalloons1Rende i commenti del documento in fumetti a margine. Questo è il valore predefinito.
ShowInAnnotations2Rende i commenti del documento nelle annotazioni. Disponibile solo per il formato PDF.

Esempi

Mostra come mostrare i commenti quando si salva un documento in un formato sottoposto a rendering.

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 è disponibile solo nei formati Pdf1.7 e Pdf1.5.
// In altri formati, funzionerà in modo simile a Hide.
doc.LayoutOptions.CommentDisplayMode = CommentDisplayMode.ShowInAnnotations;

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

// Nota che è necessario ricostruire il layout della pagina del documento (tramite il metodo Document.UpdatePageLayout())
// dopo aver modificato i valori di Document.LayoutOptions.
doc.LayoutOptions.CommentDisplayMode = CommentDisplayMode.ShowInBalloons;
doc.UpdatePageLayout();

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

Guarda anche