[英]get specific page of .odt document using java (odftoolkit)
OdfDocument odfDocument = OdfDocument.loadDocument(in);
int pages = odfDocument.getOfficeMetadata().getDocumentStatistic().getPageCount();
I am getting the total pages, but can't find a solution to get specific page of .odt
document.我正在获取总页数,但找不到获取
.odt
文档特定页面的解决方案。 Can you propose an approach for this?你能为此提出一个方法吗?
I am trying to find a solution using odftoolkit
.我正在尝试使用
odftoolkit
找到解决方案。 Read the documentation but did not find any helper method that gives a specific page of .odt
document.阅读文档但没有找到任何提供
.odt
文档特定页面的辅助方法。
The problem is that in OdfToolkit.odt implementation there is only one page.问题是在 OdfToolkit.odt 实现中只有一页。 Sure the page count could be 10 or whatever the "real" page counter may look like in your program eg LibreOffice.
当然,页数可以是 10 或任何“真实”页面计数器在您的程序(例如 LibreOffice)中的样子。 But OdfToolkit sees all text as one page.
但是 OdfToolkit 将所有文本视为一页。 That means you can get the number of pages but you need to access the text of all pages not over there pages.
这意味着您可以获得页数,但您需要访问所有页面的文本,而不是那些页面。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.