Link Search Menu Expand Document


Convert PDF to XML with information about text value, tables, fonts, images, objects positions.

Available methods

[POST] /pdf/convert/to/xml

Auto classification Of Incoming Documents

Use /pdf/classifer (Document Classifer) endpoint to automatically sort / detect the class of the document based on keywords-based rules. For example, you can define rules to find which vendor provided the document to find which template to apply accordingly.


  • url required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in files storage. For uploading files via API please check Files Upload section. If you are randomly getting Too Many Requests or Access Denied error for your input url, please try to add cache: to enable built-in url caching.
  • pages optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash -, for example: 0,2-5,7-. To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7) page till the end of the document. Must be a String.
  • unwrap optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be one of: true, false.
  • rect optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.
  • lang optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is eng. Supported values: eng, spa, deu, fra, jpn, chi_sim, chi_tra, kor. You can also specify two languages to be used on the same page, for example: eng+deu, jpn+kor or other combinations. For more languages please contact our customer support.
  • inline optional. Must be one of: true to return data as inline or false to return link to output file (default).
  • lineGrouping optional. optional. Line grouping within table cells. Set to 1 to enable the grouping. Must be a String.

  • encrypt optional. Enable encryption for output file. Must be one of: true, false.
  • async optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
  • name optional. File name for generated output. Must be a String.
  • profiles optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.


  • Method: POST
  • URL: /v1/pdf/convert/to/xml

Query parameters

No query parameters accepted.

Body payload

    "url": ""

Example responses

    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<document>\r\n  <page index=\"0\">\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"24.0\" fontStyle=\"Bold\" color=\"#538DD3\" x=\"36.00\" y=\"34.44\" width=\"242.81\" height=\"24.00\">Your Company Name</text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"76.94\" width=\"66.62\" height=\"11.04\">Your Address</text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"91.46\" width=\"69.14\" height=\"11.04\">City, State Zip</text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"461.02\" y=\"115.94\" width=\"98.42\" height=\"11.04\">Invoice No. 123456</text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"436.54\" y=\"130.46\" width=\"122.90\" height=\"11.04\">Invoice Date 01/01/2016</text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"36.00\" y=\"154.94\" width=\"63.62\" height=\"11.04\">Client Name</text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"169.70\" width=\"40.34\" height=\"11.04\">Address</text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"184.22\" width=\"69.14\" height=\"11.04\">City, State Zip</text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"233.30\" width=\"28.70\" height=\"11.04\">Notes</text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"36.00\" y=\"316.25\" width=\"22.58\" height=\"11.04\">Item</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"247.61\" y=\"316.25\" width=\"44.64\" height=\"11.04\">Quantity</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"398.95\" y=\"316.25\" width=\"26.91\" height=\"11.04\">Price</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"533.14\" y=\"316.25\" width=\"26.30\" height=\"11.04\">Total</text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"341.33\" width=\"30.62\" height=\"11.04\">Item 1</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"286.13\" y=\"341.33\" width=\"6.12\" height=\"11.04\">1</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"398.35\" y=\"341.33\" width=\"27.51\" height=\"11.04\">40.00</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"531.94\" y=\"341.33\" width=\"27.50\" height=\"11.04\">40.00</text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"362.45\" width=\"30.62\" height=\"11.04\">Item 2</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"286.13\" y=\"362.45\" width=\"6.12\" height=\"11.04\">2</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"398.35\" y=\"362.45\" width=\"27.51\" height=\"11.04\">30.00</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"531.94\" y=\"362.45\" width=\"27.50\" height=\"11.04\">60.00</text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"383.57\" width=\"30.62\" height=\"11.04\">Item 3</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"286.13\" y=\"383.57\" width=\"6.12\" height=\"11.04\">3</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"398.35\" y=\"383.57\" width=\"27.51\" height=\"11.04\">20.00</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"531.94\" y=\"383.57\" width=\"27.50\" height=\"11.04\">60.00</text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"404.93\" width=\"30.62\" height=\"11.04\">Item 4</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"286.13\" y=\"404.93\" width=\"6.12\" height=\"11.04\">4</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"398.35\" y=\"404.93\" width=\"27.51\" height=\"11.04\">10.00</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" x=\"531.94\" y=\"404.93\" width=\"27.50\" height=\"11.04\">40.00</text>\r\n      </column>\r\n    </row>\r\n    <row>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text>\r\n        </text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"389.11\" y=\"425.83\" width=\"36.75\" height=\"11.04\">TOTAL</text>\r\n      </column>\r\n      <column>\r\n        <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"525.82\" y=\"425.83\" width=\"33.62\" height=\"11.04\">200.00</text>\r\n      </column>\r\n    </row>\r\n  </page>\r\n</document>",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "sample.xml",
    "remainingCredits": 60563

Code Snippets

curl --location --request POST '' \
--header 'x-api-key: ' \
--data-raw '{
    "url": ""
var myHeaders = new Headers();
myHeaders.append("x-api-key", "");

var raw = "{\n    \"url\": \"\"\n}";

var requestOptions = {
	method: 'POST',
	headers: myHeaders,
	body: raw,
	redirect: 'follow'

fetch("", requestOptions)
	.then(response => response.text())
	.then(result => console.log(result))
	.catch(error => console.log('error', error));
var request = require('request');
var options = {
	'method': 'POST',
	'url': '',
	'headers': {
		'x-api-key': ''
	body: '{\n    "url": ""\n}'

request(options, function (error, response) {
	if (error) throw new Error(error);


$curl = curl_init();

curl_setopt_array($curl, array(
    "url": ""
		'x-api-key: '

$response = curl_exec($curl);

echo $response;

import okhttp3.*;
public class main {
	public static void main(String []args) throws IOException{
		OkHttpClient client = new OkHttpClient().newBuilder()
		MediaType mediaType = MediaType.parse("text/plain");
		RequestBody body = RequestBody.create(mediaType, "{\n    \"url\": \"\"\n}");
		Request request = new Request.Builder()
			.method("POST", body)
			.addHeader("x-api-key", "")
		Response response = client.newCall(request).execute();

using System;
using RestSharp;
namespace HelloWorldApplication {
	class HelloWorld {
		static void Main(string[] args) {
			var client = new RestClient("");
			client.Timeout = -1;
			var request = new RestRequest(Method.POST);
			request.AddHeader("x-api-key", "");
			var body = @"{" + "\n" +
			@"    ""url"": """"" + "\n" +
			request.AddParameter("text/plain", body,  ParameterType.RequestBody);
			IRestResponse response = client.Execute(request);

import requests

url = ""

payload = "{\n    \"url\": \"\"\n}"
headers = {
	'x-api-key': ''

response = requests.request("POST", url, headers=headers, data=payload)


$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("x-api-key", "")

$body = "{`n    `"url`": `"`"`n}"

$response = Invoke-RestMethod '' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json