ParseApi expected to return text by page

I started to use the .NET SDK for the Cloud API

Reading documentation and looking at the objects in the SDK, I expected the response object “Pages” to return page index + text

I managed to get the data back by page, by requesting the following on my request option

  • StartPageNumber 0
  • CountPagesToExtract = 2

However, I want the text back by page without limit it to any specific number of pages (I don’t know the page count)

I think I tried all combinations
With

  • StartPageNumber 0
  • CountPagesToExtract = 0
    No error, but no data returned

With

  • StartPageNumber 0
  • CountPagesToExtract = null
    {"code":"errorInvalidInputData","message":"Request parameters missing or have incorrect format","description":"Operation Failed. The input data is not valid.","dateTime":"2023-05-10T14:51:38.9527905Z","innerError":null}

With

  • StartPageNumber 0
  • CountPagesToExtract = 100
    {"code":"errorInvalidInputData","message":"Request parameters missing or have incorrect format","description":"Operation Failed. The input data is not valid.","dateTime":"2023-05-10T14:53:39.8243215Z","innerError":null}

Does this mean that its not possible to get the text extracted per page without knowing the page count?

@dhjimmie

Please note that you can fulfil your requirement with two API calls. First find the total page count using the GetInfo API method and then pass the page count value to CountPagesToExtract in the Text API as follows:

// for two pages document
 StartPageNumber=0,
 CountPagesToExtract=2

ok yeah that is possible, but not very appealing due to the pricing structure

@dhjimmie

Thanks for your feedback. Please note If you do not pass the pages parameter, it returns the text of the complete document. Actually, it is by design, as most users want to get the complete text or of a specific page range.