Page 1 of 1

WSDocument does give the number of pages

Posted: Mon Oct 15, 2018 12:02 pm
by visheeg
In the webservice test TestDownload.java I modified the method testDownloadDocument to display the number of pages for a particular PDF file that I uploaded. It returns zero as the number of pages.
Here is an extract of the code to display the number of pages:

long docId = 3276800;
WSDocument mydoc = docc.getDocument(sid, docId);
System.out.println("Pages: " + mydoc.getPages());

Let me know if this is a known issues and whether this has not yet been implemented.

Thanks.

Re: WSDocument does give the number of pages

Posted: Mon Oct 22, 2018 4:26 pm
by agaspa
Hi,
during the indexing process, the system opens the PDF, extracts the content and simultaneously records the number of pages in the PDF.
If all goes well, that is, if the PDF is not corrupted and the libraries are able to operate on the content, the page field is updated.
Your code is fine, but the document have to be indexed by the Indexer task or manually
https://docs.logicaldoc.com/en/system/scheduled-tasks