Hi,

I'm trying to get the page count of a document through the API.  

I've tried...

Object document = xComponentLoader.loadComponentFromURL(docURL,
"_blank", 0, loaderValues);

XDocumentProperties xProps = (XDocumentProperties)
UnoRuntime.queryInterface(XDocumentProperties.class, document);

NamedValue[] stats = xProps.getDocumentStatistics();

To get the statistics of the doc, which should have the page count, but
the xProps value is NULL.

I also looked into... com.sun.star.text.TextField.PageCount -
http://api.openoffice.org/docs/common/ref/com/sun/star/text/textfield/Pa
geCount.html  - but I don't know how to actually retrieve the "short"
value of that represents the number of pages.

Is there an easy way to get the page count of the document that I'm
missing?  

Aaron



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to