com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class LightweightOperatorCollection

  • All Implemented Interfaces:
    com.aspose.ms.System.Collections.Generic.IGenericEnumerable<Operator>, com.aspose.ms.System.Collections.IEnumerable<Operator>, Iterable<Operator>


    public class LightweightOperatorCollection
    extends BaseOperatorCollection
    implements com.aspose.ms.System.Collections.Generic.IGenericEnumerable<Operator>

    Lightweight operator collection. Intended to be used in scenarios when underlying contents stream is not attached, where just operator collection is required as a result.

    • Constructor Detail

      • LightweightOperatorCollection

        public LightweightOperatorCollection()
        Initialize object
      • LightweightOperatorCollection

        public LightweightOperatorCollection(com.aspose.pdf.engine.data.ITrailerable trailerable,
                                             com.aspose.ms.System.Collections.Generic.List<Operator> operators)
        For internal usage only!
        Parameters:
        trailerable - Internal object
        operators - Internal object
      • LightweightOperatorCollection

        public LightweightOperatorCollection(OperatorCollection operatorCollection)
        Initialize object
        Parameters:
        operatorCollection - OperatorCollection object
    • Method Detail

      • get_Item

        public Operator get_Item(int index)

        Gets operator by its index.


         Example demonstrates how to get operator of page contents by index.
         
         
         Document doc = new Document("input.pdf");
         OperatorCollection oc = doc.getPages().get_Item(1).getContents();
         Operator first = oc.get_Item(1);
         
        Specified by:
        get_Item in class BaseOperatorCollection
        Parameters:
        index - Index of operator. Numbering is starts from 1.
        Returns:
        Operator from requested index
      • set_Item

        public void set_Item(int index,
                             Operator value)
        Sets operator by its index.
         Example demonstrates how to get operator of page contents by index.
         
         
         Document doc = new Document("input.pdf");
         OperatorCollection oc = doc.getPages().get_Item(1).getContents();
         Operator first = oc.get_Item(1);
         
        Specified by:
        set_Item in class BaseOperatorCollection
        Parameters:
        index - Index of operator. Numbering is starts from 1.
        value - Operator from requested index
      • iterator

        public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<Operator> iterator()
        Return iterator
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<Operator>
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable<Operator>
        Specified by:
        iterator in interface Iterable<Operator>
        Specified by:
        iterator in class BaseOperatorCollection
        Returns:
        IGenericEnumerator<Operator> object
      • isFastTextExtractionMode

        public boolean isFastTextExtractionMode()

        Indicates whether collection is limited to fast text extraction

        Specified by:
        isFastTextExtractionMode in class BaseOperatorCollection
        Returns:
        boolean value
      • suppressUpdate

        public void suppressUpdate()

        Suppresses update contents data. The contents stream is not updated until ResumeUpdate is called.

        Specified by:
        suppressUpdate in class BaseOperatorCollection
      • resumeUpdate

        public void resumeUpdate()

        Resumes document update. Updates contents stream in case there are any pending changes.

        Specified by:
        resumeUpdate in class BaseOperatorCollection
      • getUnrestricted

        public Operator getUnrestricted(int index)
        For internal usage getUnrestricted operator
        Specified by:
        getUnrestricted in class BaseOperatorCollection
        Parameters:
        index - int value
        Returns:
        Operator object
      • cancelUpdate

        public void cancelUpdate()

        Cancels last update. This method may be called when the change should not raise contents update.

        Specified by:
        cancelUpdate in class BaseOperatorCollection
      • toList

        public com.aspose.ms.System.Collections.Generic.List<Operator> toList()

        Returns operators list.

        Specified by:
        toList in class BaseOperatorCollection
        Returns:
        operators list.