Class NumberOfPagesStatisticsEvent
java.lang.Object
com.itextpdf.commons.actions.AbstractITextEvent
com.itextpdf.commons.actions.AbstractProductITextEvent
com.itextpdf.commons.actions.AbstractStatisticsEvent
com.itextpdf.kernel.pdf.statistics.NumberOfPagesStatisticsEvent
- All Implemented Interfaces:
-
IEvent
Class which represents event for counting the number of pages in a PDF document. Only for internal usage.
-
Constructor Summary
ConstructorDescriptionNumberOfPagesStatisticsEvent
(int numberOfPages, ProductData productData) Creates an instance of this class based on theProductData
and the number of pages. -
Method Summary
Modifier and TypeMethodDescriptioncreateStatisticsAggregatorFromName
(String statisticsName) Creates statistics aggregator based on provided statistics name.int
Gets number of pages in the PDF document during the processing of which the event was sent.Gets all statistics names related to this event.Methods inherited from class com.itextpdf.commons.actions.AbstractProductITextEvent
getProductData, getProductName
-
Constructor Details
-
NumberOfPagesStatisticsEvent
Creates an instance of this class based on theProductData
and the number of pages.- Parameters:
-
numberOfPages
- the number of pages in the PDF document during the processing of which the event was sent -
productData
- is a description of the product which has generated an event
-
-
Method Details
-
createStatisticsAggregatorFromName
Creates statistics aggregator based on provided statistics name. By default prints log warning and returnsnull
.- Overrides:
-
createStatisticsAggregatorFromName
in classAbstractStatisticsEvent
- Parameters:
-
statisticsName
- name of statistics based on which aggregator will be created. Shall be one of those returned fromAbstractStatisticsEvent.getStatisticsNames()
- Returns:
-
new instance of
AbstractStatisticsAggregator
-
getStatisticsNames
Gets all statistics names related to this event.- Specified by:
-
getStatisticsNames
in classAbstractStatisticsEvent
- Returns:
-
List
of statistics names
-
getNumberOfPages
public int getNumberOfPages()Gets number of pages in the PDF document during the processing of which the event was sent.- Returns:
- the number of pages
-