com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class LightweightOperatorCollection

  • All Implemented Interfaces:
    Iterable<Operator>


    public class LightweightOperatorCollection
    extends BaseOperatorCollection

    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
      • 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
      • addRange

        public void addRange(LightweightOperatorCollection oc)
        Add LightweightOperatorCollection
        Parameters:
        oc - LightweightOperatorCollection instance
      • 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.
      • isReadOnly

        public boolean isReadOnly()

        Gets a value indicating whether the collection is read-only.

        Specified by:
        isReadOnly in class BaseOperatorCollection
        Returns:
        boolean value