OperatorCollection.Insert

Insert(int, Operator)

Inserts operator into collection.

public override void Insert(int index, Operator op)
ParameterTypeDescription
indexInt32Index where new operator must be added
opOperatorOperator which will be insterted

Examples

Example demonstrates how to insert operator to the page contents.

Document doc = new Document("input.pdf");
OperatorCollection oc = doc.Pages[1].Contents;
oc.Insert(1, new Aspose.Pdf.Operators.q());
oc.Add(new Aspose.Pdf.Operators.Q());

See Also


Insert(int, Operator[])

Insert operators at the the given position.

public void Insert(int at, Operator[] ops)
ParameterTypeDescription
atInt32Index from which operators are being started to insert.
opsOperator[]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.

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


Insert(int, IList<Operator>)

Insert operators at the the given position.

public void Insert(int at, IList<Operator> ops)
ParameterTypeDescription
atInt32Index from which operators are being started to insert.
opsIList`1Array of operators to be inserted.

Examples

Example demonstrates how to insert operators to page contents.

Document doc = new Document("input.pdf");
OperatorCollection oc = doc.Pages[1].Contents;
List<Operator> opList = new List<Operator>();
opList.Add(new Operators.q());
opList.Add(new Operators.Q());
oc.Insert(1, opList);

See Also