XRendering DrawAnnotations Property. Whether to render fields and annotations. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Value Read Only Description
[C#] bool

[Visual Basic]
Boolean
true No Whether to render fields and annotations.

 

   

Notes
 

Determines whether fields and annotations will be rendered.

PDF fields and annotations are not part of the PDF content. Instead they float over the PDF background. You may choose to render these fields or you may wish to avoid rendering them.

The export of file types like XPS, DOCX and HTML is implemented using rendering. For this reason the DrawAnnotations proprety will determine if Annotations are exported when saving these formats using the Doc.Save method.

 

   

Example
 

The following example shows the effect that this parameter has on PDF rendering.

[C#]
Doc theDoc = new Doc();
theDoc.Read(Server.MapPath("../mypics/Annotations.pdf"));
theDoc.Rect.Pin = XRect.Corner.TopLeft;
theDoc.Rect.Height = 300;
// Render document with DrawAnnotations (default)
theDoc.Rendering.Save(Server.MapPath("RenderingDrawAnnotationsTrue.png"));
// Render document without DrawAnnotations
theDoc.Rendering.DrawAnnotations = false;
theDoc.Rendering.Save(Server.MapPath("RenderingDrawAnnotationsFalse.png"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Read(Server.MapPath("../mypics/Annotations.pdf"))
theDoc.Rect.Pin = XRect.Corner.TopLeft
theDoc.Rect.Height = 300
' Render document with DrawAnnotations (default)
theDoc.Rendering.Save(Server.MapPath("RenderingDrawAnnotationsTrue.png"))
' Render document without DrawAnnotations
theDoc.Rendering.DrawAnnotations = False
theDoc.Rendering.Save(Server.MapPath("RenderingDrawAnnotationsFalse.png"))
theDoc.Clear()


RenderingDrawAnnotationsTrue.png


RenderingDrawAnnotationsFalse.png