Client-side API (how to call Multivio's interface)

  • file in case the provided document is composed of several files, it is possible to specify which one to present at startup
  • position the number of the page to display initially
  • theme the graphical theme to be used (currently dark-gray | white | blue )
  • search the search expression to use at startup
  • url the actual document's URL (Note: this must be the last parameter)

Server-side API

.*?/document/.*?

render

Using the GET method it returns a thumbnail in PNG format of a given size for a given image.

Arguments:

  • url --string-- url of an image file.
  • max_width --integer-- max width of the output image in pixel. (default none)
  • max_height --integer-- max height of the output image in pixel. (default none)
  • page_nr --integer-- extract the page <pagenr>. Pdf only. (default 1).
  • angle --integer-- angle rotation. (default 0).

Examples:

Searches text inside a PDF file and returns the results in a dictionary structure.

Arguments:

  • url --string-- url of a pdf file. Required.
  • query --string-- text to find in the document. Required.
  • from --integer-- start the search at page from. (default 1).
  • to --integer-- end the search at page to. (default <number_of_pages>).
  • max_results --integer-- limit the number of the returned results. (default 50).
  • context_size --integer-- approximate number of characters of context around found words (left & right). (default 0).
  • angle --integer-- angle of display in degrees. (default 0).

Example: * Search example

get_text

Returns the text contained inside the selected area of a PDF page.

Arguments:

  • url --string-- url of a pdf file. Required.
  • page_nr --integer-- Number of the page to get text from. (default 1).
  • x1 --integer-- x-coordinate of upper-left point of selected area. (default 0).
  • y1 --integer-- y-coordinate of upper-left point of selected area. (default 0).
  • x2 --integer-- x-coordinate of bottom-right point of selected area. (default 0).
  • y2 --integer-- y-coordinate of bottom-right point of selected area. (default 0).

Example:

get_indexing

Returns the index of a range of pages of the document. If a range of pages is specified with from and to, page_nr is ignored. Else, the page number is used.

Arguments:

  • url --string-- URL of a pdf file. Required.
  • page_nr --integer-- Number of the page to get the indexing from. (default 1).
  • from --integer-- start page to get indexing of a range of pages. (default 1).
  • to --integer-- end page to get indexing of a range of pages. (default <number_of_pages>).

Examples:

.*?/metadata/.*?

Using the GET method it returns the metadata, the logical structure and the physical structure of a document, in JSON format.

Arguments:

  • url --string-- url of a XML/PDF file representing the document

Examples:

get

Examples:

Examples with the METS format:

Examples with PDF:

get_logical

Examples:

Examples with the METS format:

Examples with PDF:

get_physical

Examples:

Examples with the METS format:

Examples with PDF:

.*?/log/post

Using the POST method it put a log message in the server.

.*?/version

Asks the server instance to obtain its version in JSON format.

Example:

{
  "name" : "Multivio Server",
  "version" : "0.0.1",
  "api_version" : "0.1"
}