OperatorCollectionInsert Method (Int32, Operator)
Insert operators at the the given position.

Namespace: Aspose.Pdf
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 20.3
Syntax
public void Insert(
	int at,
	Operator[] ops
)

Parameters

at
Type: SystemInt32
Index from which operators are being started to insert.
ops
Type: Aspose.PdfOperator
Array of operators to be inserted. Each operator can have any index (by default -1) because their indices adjusted automatically starting from at.
Examples
Example demonstrates how to insert operator to the page contents.
C#
Document doc = new Document("input.pdf");
OperatorCollection oc = doc.Pages[1].Contents;
oc.Insert(1, new Operator[] { new Aspose.Pdf.Operators.q(), new Aspose.Pdf.Operators.Q() } );
See Also