WSDocument does give the number of pages

Do you want to create a native client or integrate with third party applications: webservices are the solution.

Moderator: car031

visheeg
Posts: 1
Joined: Mon Oct 15, 2018 11:44 am

WSDocument does give the number of pages

Mon Oct 15, 2018 12:02 pm

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.
agaspa
Posts: 620
Joined: Tue Apr 20, 2010 8:24 am

Re: WSDocument does give the number of pages

Mon Oct 22, 2018 4:26 pm

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

Return to “Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest