com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class PageCollection

  • All Implemented Interfaces:
    Iterable<Page>


    public final class PageCollection
    extends Object
    implements Iterable<Page>

    Collection of PDF document pages.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void accept(AnnotationSelector visitor)
      Accepts AnnotationSelector visitor object that provides functionality to work with annotations.
      void accept(ImagePlacementAbsorber visitor)
      Accepts ImagePlacementAbsorber visitor object that provides functionality to work with image placement objects.
      void accept(TextAbsorber visitor)
      Accepts TextAbsorber visitor object that provides functionality to work with text objects.
      void accept(TextFragmentAbsorber visitor)
      Accepts TextFragmentAbsorber visitor object that provides functionality to work with text objects.
      Page add()
      Adds empty page
      void add(Iterable<Page> pages)
      Adds to collection all pages from list.
      void add(List<Page> pages)
      Adds to collection all pages from list.
      Page add(Page entity)
      Adds page to collection.
      void add(Page[] pages)
      Adds to collection all pages from array.
      void clear()
      Clear page collection.
      void delete()
      Deletes all pages from collection.
      void delete(int index)
      Delete specified page.
      void delete(Integer[] pages)
      Delete pages specified which numbers are specified in array.
      void flatten()
      Removes all fields located on the pages and place their values instead.
      void freeMemory()
      Clears cached data
      Page get_Item(int index)
      Gets page by index.
      Object getSyncRoot()
      Gets synchronization object of the collection.
      Page getUnrestricted(int index)
      Returns page by its index.
      int indexOf(Page entity)
      Returns index of the specified page.
      Page insert(int pageNumber)
      Insert empty apge into collection at the specified position.
      void insert(int pageNumber, Iterable<Page> pages)
      Inserts pages from the collection into document.
      void insert(int pageNumber, List<Page> pages)
      Inserts pages from the collection into document.
      Page insert(int pageNumber, Page entity)
      Inserts page into page collection at specified place.
      void insert(int pageNumber, Page[] pages)
      Inserts pages of the array into document.
      boolean isEmpty()
      Returns TRUE if the collection is empty.
      boolean isSynchronized()
      Returns true of object is synchorinzed.
      com.aspose.ms.System.Collections.IEnumerator iterator()
      Returns enumerator of pages.
      int size()
      Gets count of pages in the document.
    • Method Detail

      • size

        public int size()

        Gets count of pages in the document.

        Returns:
        int value
      • isEmpty

        public boolean isEmpty()

        Returns TRUE if the collection is empty.

        Returns:
        boolean value
      • isSynchronized

        public boolean isSynchronized()

        Returns true of object is synchorinzed.

        Returns:
        boolean value
      • getSyncRoot

        public Object getSyncRoot()

        Gets synchronization object of the collection.

        Returns:
        Object for synchronization
      • add

        public Page add(Page entity)

        Adds page to collection.

        Parameters:
        entity - Page which should be added.
        Returns:
        Added page.
      • clear

        public void clear()

        Clear page collection.

      • delete

        public void delete(int index)

        Delete specified page.

        Parameters:
        index - Number of page that will be deleted. Pages numbers start from 1.
      • delete

        public void delete()

        Deletes all pages from collection.

      • indexOf

        public int indexOf(Page entity)

        Returns index of the specified page.

        Parameters:
        entity - Page object. Pages numbers start from 1.

        Pages numbers start from 1. Returns 0 in case collection doesn't contain the page.

        Returns:
        Index of the page in collection.
      • getUnrestricted

        public Page getUnrestricted(int index)

        Returns page by its index. Page

        Parameters:
        index - Index of requested page. Pages are numbered from 1.
        Returns:
        Requested page
      • iterator

        public com.aspose.ms.System.Collections.IEnumerator iterator()

        Returns enumerator of pages.

        Specified by:
        iterator in interface Iterable<Page>
        Returns:
        Enumerator of pages
      • accept

        public void accept(AnnotationSelector visitor)

        Accepts AnnotationSelector visitor object that provides functionality to work with annotations.

        Parameters:
        visitor - AnnotationSelector Visitor
      • delete

        public void delete(Integer[] pages)

        Delete pages specified which numbers are specified in array.

        Parameters:
        pages - Array of pages to be deleted.
      • insert

        public Page insert(int pageNumber)

        Insert empty apge into collection at the specified position.

        Parameters:
        pageNumber - Position of the new page.
        Returns:
        Inserted page.
      • add

        public Page add()

        Adds empty page

        Returns:
        Added page.
      • add

        public void add(List<Page> pages)

        Adds to collection all pages from list.

        Parameters:
        pages - List which contains all pages which must be added.
      • add

        public void add(Iterable<Page> pages)

        Adds to collection all pages from list.

        Parameters:
        pages - List which contains all pages which must be added.
      • insert

        public Page insert(int pageNumber,
                           Page entity)

        Inserts page into page collection at specified place.

        Parameters:
        pageNumber - Required page index in collection.
        entity - Page to be inserted.
        Returns:
        Inserted page.
      • get_Item

        public Page get_Item(int index)

        Gets page by index.

        Parameters:
        index - Index of page.
        Returns:
        Retreived page.
      • accept

        public void accept(ImagePlacementAbsorber visitor)

        Accepts ImagePlacementAbsorber visitor object that provides functionality to work with image placement objects.

        Parameters:
        visitor - Image placement object.
      • accept

        public void accept(TextFragmentAbsorber visitor)

        Accepts TextFragmentAbsorber visitor object that provides functionality to work with text objects.

        Parameters:
        visitor - Text fragment absorber object.
      • accept

        public void accept(TextAbsorber visitor)

        Accepts TextAbsorber visitor object that provides functionality to work with text objects.

        Parameters:
        visitor - Text absorber object.
      • add

        public void add(Page[] pages)

        Adds to collection all pages from array.

        Parameters:
        pages - Array of pages which will be added.
      • insert

        public void insert(int pageNumber,
                           Iterable<Page> pages)

        Inserts pages from the collection into document.

        Parameters:
        pageNumber - Starting position of the new pages.
        pages - Pages collection.
      • insert

        public void insert(int pageNumber,
                           List<Page> pages)

        Inserts pages from the collection into document.

        Parameters:
        pageNumber - Starting position of the new pages.
        pages - Pages collection.
      • insert

        public void insert(int pageNumber,
                           Page[] pages)

        Inserts pages of the array into document.

        Parameters:
        pageNumber - Starting number of the new pages.
        pages - Array of pages which will be inserted.
      • flatten

        public void flatten()

        Removes all fields located on the pages and place their values instead.

      • freeMemory

        public void freeMemory()

        Clears cached data