Doc Options Property. The state options for low level drawing control. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Read Only Description
[C#] string

[Visual Basic]
String
  "" No The state options for low level drawing control.

 

   

Notes
 

The options property is an advanced feature which allows low level control over PDF drawing. It is important to use it correctly as incorrect use can corrupt your documents.

The value of the options property is inserted into the PDF content stream after state has been established but before any drawing has taken place. You can use this property to insert your own state commands. This is most commonly used for drawing dashed lines.

FillRect, FrameRect, AddLine and AddArc all insert the options parameter.

You can find details of graphics state parameters and how to use them in the Adobe PDF Specification.

 

   

Example
 

The following code adds an arc to a document. It uses the options parameter to make the line dashed rather than solid.

[C#]
Doc theDoc = new Doc();
theDoc.Width = 24;
theDoc.Color.String = "0 120 0";
theDoc.Options = "[6 10] 6 d";
theDoc.AddArc(0, 270, 300, 400, 200, 300);
theDoc.Save(Server.MapPath("docoptions.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Width = 24
theDoc.Color.String = "0 120 0"
theDoc.Options = "[6 10] 6 d"
theDoc.AddArc(0, 270, 300, 400, 200, 300)
theDoc.Save(Server.MapPath("docoptions.pdf"))
theDoc.Clear()


docoptions.pdf