PageNumber

Inheritance: java.lang.Object, com.aspose.pdf.artifacts.pagination.PageNumber

public final class PageNumber extends Object

Represents a page number format that includes an index, total number of pages, and a delimiter.

Constructors

ConstructorDescription
PageNumber

Methods

MethodDescription
getDelimiterGets or sets the delimiter used in the page number format. The formatted string will be updated based on the specified delimiter.
getIndexGets or sets the page index component of the page number format. The formatted string will include a placeholder for the page index.
getOffsetGets or sets the offset to be added to the page index.
getPageNumberStringReturns a formatted string representing the page number based on the current settings.
getTotalNumGets or sets the total number of pages component of the page number format. The formatted string will include a placeholder for the total number of pages.
setDelimiterGets or sets the delimiter used in the page number format. The formatted string will be updated based on the specified delimiter.
setIndexGets or sets the page index component of the page number format.
setOffsetGets or sets the offset to be added to the page index.
setTotalNumGets or sets the total number of pages component of the page number format.

PageNumber

public PageNumber()

getDelimiter

public final String getDelimiter()

Gets or sets the delimiter used in the page number format. The formatted string will be updated based on the specified delimiter.

Returns: String value

getIndex

public final PageNumber.PageIndex getIndex()

Gets or sets the page index component of the page number format. The formatted string will include a placeholder for the page index.

Returns: PageIndex instance

getOffset

public final int getOffset()

Gets or sets the offset to be added to the page index.

Returns: int value

getPageNumberString

public final String getPageNumberString(int pageNumber, int count)

Returns a formatted string representing the page number based on the current settings.

Parameters:

ParameterTypeDescription
pageNumberThe current page number.
countThe total number of pages.

Returns: A formatted page number string.

getTotalNum

public final PageNumber.PageTotalNum getTotalNum()

Gets or sets the total number of pages component of the page number format. The formatted string will include a placeholder for the total number of pages.

Returns: PageTotalNum instance

setDelimiter

Gets or sets the delimiter used in the page number format. The formatted string will be updated based on the specified delimiter.

setIndex

Gets or sets the page index component of the page number format.

setOffset

public final void setOffset(int value)

Gets or sets the offset to be added to the page index.

Parameters:

ParameterTypeDescription
valueint value

setTotalNum

Gets or sets the total number of pages component of the page number format.