OperatorCollection.Add

Add(Operator)

Adds new operator into collection.

public override void Add(Operator op)
ParameterTypeDescription
opOperatorOperator which must be added

Examples

Example demonstrates how to add operators to the end of page.contents.

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

See Also


Add(Operator[])

Add operators at the end of the contents operators.

public void Add(Operator[] ops)
ParameterTypeDescription
opsOperator[]Array of operators to be added. Each operator can have any index (by default -1) because they come to the end of the contents operators i.e. indices are assigned automatically.

Examples

Example demonstrates how to add operator to the end of page contents.

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

See Also


Add(ICollection<Operator>)

Adds to collection all operators from other collection.

public void Add(ICollection<Operator> ops)
ParameterTypeDescription
opsICollection`1collection whitch contains operators which will be added.

Examples

Example demonstrates how to add operator collection to the page contents.

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

See Also