OperatorCollection.Insert
Contents
[
Hide
]Insert(int, Operator)
Inserts operator into collection.
public override void Insert(int index, Operator op)
Parameter | Type | Description |
---|---|---|
index | Int32 | Index where new operator must be added |
op | Operator | Operator 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
- class Operator
- class OperatorCollection
- namespace Aspose.Pdf
- assembly Aspose.PDF
Insert(int, Operator[])
Insert operators at the the given position.
public void Insert(int at, Operator[] ops)
Parameter | Type | Description |
---|---|---|
at | Int32 | Index from which operators are being started to insert. |
ops | Operator[] | 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
- class Operator
- class OperatorCollection
- namespace Aspose.Pdf
- assembly Aspose.PDF
Insert(int, IList<Operator>)
Insert operators at the the given position.
public void Insert(int at, IList<Operator> ops)
Parameter | Type | Description |
---|---|---|
at | Int32 | Index from which operators are being started to insert. |
ops | IList`1 | Array 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
- class Operator
- class OperatorCollection
- namespace Aspose.Pdf
- assembly Aspose.PDF