[]
        
(Showing Draft Content)

PageContentInfo

Class PageContentInfo

java.lang.Object
com.grapecity.documents.excel.PageContentInfo

public class PageContentInfo extends Object
Represents the printable content area of a page.

A PageContentInfo object describes which worksheet range is printed on a page, along with page content settings such as title rows, tail rows, title columns, tail columns, row headers, column headers, and zoom factor. It is commonly used when customizing page output for printing or PDF export, and can also be obtained from PageInfo.getPageContent().


 PageContentInfo pageContent = new PageContentInfo();
 pageContent.setRange(worksheet.getRange("A1:F20"));
 pageContent.setTitleRowStart(0);
 pageContent.setTitleRowEnd(1);
 pageContent.setColumnHeaderVisible(true);
 
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a page content info.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Gets whether the column header is printed.
    final IRange
    Gets the range to be printed.
    boolean
    Gets whether the row header is printed.
    final int
    Gets the end index of the columns that are printed at the right of the page.
    final int
    Gets the start index of the columns that are printed at the right of the page.
    final int
    Gets the end index of the rows that are printed at the bottom of the page.
    final int
    Gets the start index of the rows that are printed at the bottom of the page.
    final int
    Gets the end index of the columns that are printed at the left of the page.
    final int
    Gets the start index of the columns that are printed at the left of the page.
    final int
    Gets the end index of the rows that are printed at the top of the page.
    final int
    Gets the start index of the rows that are printed at the top of the page.
    final double
    Gets the percentage by which Document Solutions for Excel scales the worksheet for printing.
    final void
    setColumnHeaderVisible(boolean value)
    Sets whether the column header is printed.
    final void
    Sets the range to be printed.
    void
    setRowHeaderVisible(boolean value)
    Sets whether the row header is printed.
    final void
    setTailColumnEnd(int value)
    Sets the end index of the columns that are printed at the right of the page.
    final void
    setTailColumnStart(int value)
    Sets the start index of the columns that are printed at the right of the page.
    final void
    setTailRowEnd(int value)
    Sets the end index of the rows that are printed at the bottom of the page.
    final void
    setTailRowStart(int value)
    Sets the start index of the rows that are printed at the bottom of the page.
    final void
    setTitleColumnEnd(int value)
    Sets the end index of the columns that are printed at the left of the page.
    final void
    Sets the start index of the columns that are printed at the left of the page.
    final void
    setTitleRowEnd(int value)
    Sets the end index of the rows that are printed at the top of the page.
    final void
    setTitleRowStart(int value)
    Sets the start index of the rows that are printed at the top of the page.
    final void
    setZoomFactor(double value)
    Sets the percentage by which Document Solutions for Excel scales the worksheet for printing.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PageContentInfo

      public PageContentInfo()
      Creates a page content info.

      Initializes a PageContentInfo instance that can be configured with a printable range and page content settings, such as repeated title rows or visible headers, before it is used for printing or PDF export.

  • Method Details

    • getRowHeaderVisible

      public boolean getRowHeaderVisible()
      Gets whether the row header is printed.

      This property indicates whether row headers are included when the page content is rendered for printing.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setRowHeaderVisible(true);
       boolean visible = pageContent.getRowHeaderVisible();
       
      Returns:
      true if the row header is printed; otherwise, false.
    • setRowHeaderVisible

      public void setRowHeaderVisible(boolean value)
      Sets whether the row header is printed.

      This property indicates whether row headers are included when the page content is rendered for printing.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setRowHeaderVisible(true);
       
      Parameters:
      value - true if the row header is printed; otherwise, false.
    • getColumnHeaderVisible

      public final boolean getColumnHeaderVisible()
      Gets whether the column header is printed.

      This property indicates whether column headers are included when the page content is rendered for printing.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setColumnHeaderVisible(true);
       boolean visible = pageContent.getColumnHeaderVisible();
       
      Returns:
      true if the column header is printed; otherwise, false.
    • setColumnHeaderVisible

      public final void setColumnHeaderVisible(boolean value)
      Sets whether the column header is printed.

      This property indicates whether column headers are included when the page content is rendered for printing.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setColumnHeaderVisible(true);
       
      Parameters:
      value - true if the column header is printed; otherwise, false.
    • getZoomFactor

      public final double getZoomFactor()
      Gets the percentage by which Document Solutions for Excel scales the worksheet for printing.

      This value controls the print scaling applied to the page content. The returned value is greater than 0.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setZoomFactor(75);
       double zoomFactor = pageContent.getZoomFactor();
       
      Returns:
      The print scaling percentage for the worksheet.
    • setZoomFactor

      public final void setZoomFactor(double value)
      Sets the percentage by which Document Solutions for Excel scales the worksheet for printing.

      This value controls the print scaling applied to the page content. The returned value is greater than 0.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setZoomFactor(75);
       
      Parameters:
      value - The print scaling percentage for the worksheet.
    • getRange

      public final IRange getRange()
      Gets the range to be printed.

      Returns the worksheet range associated with this PageContentInfo instance for page printing or rendering.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setRange(worksheet.getRange("A1:F20"));
       IRange range = pageContent.getRange();
       
      Returns:
      The range to be printed. Returns null if no range has been set.
    • setRange

      public final void setRange(IRange value)
      Sets the range to be printed.

      Use this method to assign the worksheet range associated with this PageContentInfo instance for page printing or rendering. Specify null to clear the currently assigned range.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setRange(worksheet.getRange("A1:F20"));
       
      Parameters:
      value - The worksheet range to be printed, or null to clear the current range.
    • getTitleRowStart

      public final int getTitleRowStart()
      Gets the start index of the rows that are printed at the top of the page.

      Use this method to retrieve the first row index in the title row range for page content printing.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTitleRowStart(0);
       int titleRowStart = pageContent.getTitleRowStart();
       
      Returns:
      The start index of the rows that are printed at the top of the page.
    • setTitleRowStart

      public final void setTitleRowStart(int value)
      Sets the start index of the rows that are printed at the top of the page.

      Use this method to set the first row index in the title row range for page content printing.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTitleRowStart(0);
       
      Parameters:
      value - The start index of the rows that are printed at the top of the page.
    • getTitleRowEnd

      public final int getTitleRowEnd()
      Gets the end index of the rows that are printed at the top of the page.

      Use this method to retrieve the last row index of the title-row area in a PageContentInfo object.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTitleRowEnd(2);
       int titleRowEnd = pageContent.getTitleRowEnd();
       
      Returns:
      The end index of the rows that are printed at the top of the page.
    • setTitleRowEnd

      public final void setTitleRowEnd(int value)
      Sets the end index of the rows that are printed at the top of the page.

      Use this method to set the last row index of the title-row area in a PageContentInfo object.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTitleRowEnd(2);
       
      Parameters:
      value - The end index of the rows that are printed at the top of the page.
    • getTailRowStart

      public final int getTailRowStart()
      Gets the start index of the rows that are printed at the bottom of the page.

      Use this method to retrieve the first row index of the tail row area in this PageContentInfo.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTailRowStart(10);
       int tailRowStart = pageContent.getTailRowStart();
       
      Returns:
      The start index of the rows that are printed at the bottom of the page.
    • setTailRowStart

      public final void setTailRowStart(int value)
      Sets the start index of the rows that are printed at the bottom of the page.

      Use this method to set the first row index of the tail row area in this PageContentInfo.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTailRowStart(10);
       
      Parameters:
      value - The start index of the rows that are printed at the bottom of the page.
    • getTailRowEnd

      public final int getTailRowEnd()
      Gets the end index of the rows that are printed at the bottom of the page.

      Use this method to retrieve the ending row index for the tail rows in this PageContentInfo.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTailRowEnd(4);
       int tailRowEnd = pageContent.getTailRowEnd();
       
      Returns:
      The end index of the rows that are printed at the bottom of the page.
    • setTailRowEnd

      public final void setTailRowEnd(int value)
      Sets the end index of the rows that are printed at the bottom of the page.

      Use this method to set the ending row index for the tail rows in this PageContentInfo.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTailRowEnd(4);
       
      Parameters:
      value - The end index of the rows that are printed at the bottom of the page.
    • getTitleColumnStart

      public final int getTitleColumnStart()
      Gets the start index of the columns that are printed at the left of the page.

      Use this property to determine the first title column included in the page content.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTitleColumnStart(1);
       int titleColumnStart = pageContent.getTitleColumnStart();
       
      Returns:
      The start index of the columns that are printed at the left of the page.
    • setTitleColumnStart

      public final void setTitleColumnStart(int value)
      Sets the start index of the columns that are printed at the left of the page.

      Use this property to set the first title column included in the page content.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTitleColumnStart(1);
       
      Parameters:
      value - The start index of the columns that are printed at the left of the page.
    • getTitleColumnEnd

      public final int getTitleColumnEnd()
      Gets the end index of the columns that are printed at the left of the page.

      Use this property together with getTitleColumnStart() to define the left-side title column range for page printing.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTitleColumnEnd(2);
       int titleColumnEnd = pageContent.getTitleColumnEnd();
       
      Returns:
      The end index of the columns that are printed at the left of the page.
    • setTitleColumnEnd

      public final void setTitleColumnEnd(int value)
      Sets the end index of the columns that are printed at the left of the page.

      Use this property together with getTitleColumnStart() to define the left-side title column range for page printing.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTitleColumnEnd(2);
       
      Parameters:
      value - The end index of the columns that are printed at the left of the page.
    • getTailColumnStart

      public final int getTailColumnStart()
      Gets the start index of the columns that are printed at the right of the page.

      This property identifies the first column in the tail-column area of the page content.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTailColumnStart(4);
       int startColumn = pageContent.getTailColumnStart();
       
      Returns:
      The start index of the columns that are printed at the right of the page.
    • setTailColumnStart

      public final void setTailColumnStart(int value)
      Sets the start index of the columns that are printed at the right of the page.

      This property identifies the first column in the tail-column area of the page content.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTailColumnStart(4);
       
      Parameters:
      value - The start index of the columns that are printed at the right of the page.
    • getTailColumnEnd

      public final int getTailColumnEnd()
      Gets the end index of the columns that are printed at the right of the page.

      This property identifies the last column in the tail-column area of the page content.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTailColumnStart(4);
       pageContent.setTailColumnEnd(6);
       int endColumn = pageContent.getTailColumnEnd();
       
      Returns:
      The end index of the columns that are printed at the right of the page. Returns -1 if the tail-column end index has not been set.
    • setTailColumnEnd

      public final void setTailColumnEnd(int value)
      Sets the end index of the columns that are printed at the right of the page.

      This property identifies the last column in the tail-column area of the page content.

      
       PageContentInfo pageContent = new PageContentInfo();
       pageContent.setTailColumnStart(4);
       pageContent.setTailColumnEnd(6);
       
      Parameters:
      value - The end index of the columns that are printed at the right of the page. Sets -1 if the tail-column end index has not been set.