Class OfficePageRange

java.lang.Object
com.itextpdf.pdfoffice.OfficePageRange

public class OfficePageRange extends Object
A class that keeps selected pages for office documents or presentations.
  • Constructor Details

    • OfficePageRange

      public OfficePageRange()
      Constructs an empty OfficePageRange instance.
  • Method Details

    • addSinglePage

      public OfficePageRange addSinglePage (int pageNumber)
      Adds a single page to the range.

      A single page could be specified in the following format:

      from the beginning of the document
      argument 3 will result in the third page being added to the range
      Note, that the order of calls of this method doesn't matter. The pages will occur in a resulting pdf in ascending order anyway.
      Parameters:
      pageNumber - the page to be added to the range
      Returns:
      this range, already modified
    • addPageSequence

      public OfficePageRange addPageSequence (int startPageNumber, int endPageNumber)
      Adds a page sequence to the range.

      Pages could be specified in the following format:

      from the beginning of the document
      arguments 1 and 3 will result in a sequence of the first, the second and the third pages being added to the range
      Note, that the order of calls of this method doesn't matter. The pages will occur in a resulting pdf in ascending order anyway.
      Parameters:
      startPageNumber - the starting page number of the sequence
      endPageNumber - the finishing page number of the sequence
      Returns:
      this range, already modified