Is there any method specified in POI API to get the total number of pages, I am able to add page number in the footer of the document but i am not able to add the total number of pages value.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Page count in
Word
is dependent of much things like font size, paragraph top/bottom margins and padding, printer settings, manually inserted page breaks and so on. So it cannot be stored directly in the file. It will be calculated on the fly whileWord
is rendering its pages.But we can use fields within the footer which also calculate the page number and the total number of pages.
Example:
The fields in
Word
then are{PAGE \* MERGEFORMAT}
and{NUMPAGES \* MERGEFORMAT}
.