Class SizeOfPdfStatisticsEvent
java.lang.Object
com.itextpdf.commons.actions.AbstractITextEvent
com.itextpdf.commons.actions.AbstractProductITextEvent
com.itextpdf.commons.actions.AbstractStatisticsEvent
com.itextpdf.kernel.pdf.statistics.SizeOfPdfStatisticsEvent
- All Implemented Interfaces:
-
IEvent
Class which represents event related to size of the PDF document. Only for internal usage.
-
Constructor Summary
ConstructorDescriptionSizeOfPdfStatisticsEvent
(long amountOfBytes, ProductData productData) Creates an instance of this class based on theProductData
and the size of the document. -
Method Summary
Modifier and TypeMethodDescriptioncreateStatisticsAggregatorFromName
(String statisticsName) Creates statistics aggregator based on provided statistics name.long
Gets number of bytes 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
-
SizeOfPdfStatisticsEvent
Creates an instance of this class based on theProductData
and the size of the document.- Parameters:
-
amountOfBytes
- the number of bytes 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
-
getAmountOfBytes
public long getAmountOfBytes()Gets number of bytes in the PDF document during the processing of which the event was sent.- Returns:
- the number of pages
-