Skip to main content
Roberty Studio
IDPBuilder

Document and pages

Upload the IDP template's reference document, set which pages of each incoming document go through the pipeline, and whether the API can change them on each run.

Document and pages

The Document stage opens the pipeline. It holds the reference document that identification compares against and sets which pages of each incoming document are analyzed.

Reference document​

The reference document is a typical example of the document the template will receive: a PDF, PNG or JPG of up to 15 MB. It is the basis of the comparison made by identification.

Once uploaded, the stage shows a thumbnail of the document, its page count, size and upload date. View pages lets you browse every page of the document.

To swap the document, click Replace document or drop a new file on the stage. The reference document is optional: without it, identification uses only the document type and the criteria you describe.

Analysis scope​

The Analysis scope field sets which pages of each incoming document go through the pipeline. Left empty, every page is analyzed, in a single run.

To narrow it down, write the pages the way you would to print them: numbers separated by commas and ranges with a hyphen, for example 1-3, 5, 8-10. The field only accepts digits, commas, spaces and hyphens, and shows right below it which pages will be analyzed.

RuleExample
Ranges can be descending.10-8 analyzes pages 10, 9 and 8.
Pages that don't exist in the document are dropped.In a 4-page document, 3-6 analyzes pages 3 and 4.
Repeated pages are analyzed only once.1-3, 2 analyzes pages 1, 2 and 3.
The written order is kept.5, 1-2 analyzes pages 5, 1 and 2.
A range with no valid page counts as empty.Every page is analyzed.

Pages set by the API​

The Allow the API to override pages per run option is off by default. When it is on, each API call can supply its own pages in the page field, using the same syntax as the analysis scope (a single number also works). Those pages apply to that run only; the scope saved in the template does not change.

With the option on, the Playground and Simulate API also show a pages field, so you can test how a call with page behaves.

warning

With the option off, an API call that sends the page field is rejected with status 400. See API and webhook.

Multi-page documents​

Every selected page is processed in the same run. What changes is how each extraction method handles them:

MethodHow it processes
LLM OCRSends every selected page to the model in a single call, so it reads the document with the context of all the pages.
Roberty Cloud OCRProcesses page by page and merges the results. Each page's text is marked with === Página N de M ===, where N is the page's actual number in the document and M is the document's total page count. Tables, forms and text blocks are tagged with the number of the page they came from.

See Extraction.