Create documents programmatically

Transform your data from XML or JSON to high quality, beautiful and readable documents in PDF, HTML, PNG or JPG.

1

Get a template

2

Send data to process

  • Connect your app or service and process data using our
    API
  • OR
  • Send XML or JSON files directly from a local folder with
    PrexView Shift
3

Get the result

In the format you want HTML, PDF, PNG or JPG


We take privacy very seriously and document creation is on the fly, when the process ends data is removed from our service.


Powerful API


Integrate in less than
5 minutes!


Our simple API provide a fast and effortless integration approach for your transactional documents.


# Get the <API_KEY> from PrexView Studio

curl -H "Authorization: <API_KEY>" \
  https://api.prexview.com/v1/transform \
  -F xml="<data.xml" \
  -F template="template-name" \
  -F output="pdf" \
  -o result.pdf


// Install prexview with: npm install prexview --save
// Set environment var PXV_API_KEY with the API_KEY

const pxv = require('prexview')
const fs = require('fs')

const options = {
  template: 'custom-invoice',
  output: 'pdf'
}

const xml = `<?xml version="1.0" encoding="UTF-8"?>
<languages>
  <lang code="en">English</lang>
  <lang code="es">Español</lang>
  <lang code="fr">Française</lang>
</languages>`

pxv.sendXML(xml, options, (err, res)=>{
  if(err) return console.log(err)
  fs.writeFile('file.pdf', res.file, (err)=>{
    console.log(`Completed with id ${res.id}`)
  })
})


// Install prexview with: php composer.phar require prexview/prexview
// Set environment var PXV_API_KEY with the API_KEY

$pxv = new Prexview\Prexview();

$options =  new stdClass();

$options->template = 'custom-invoice';
$options->output = 'pdf';

$xml = '<?xml version="1.0" encoding="UTF-8"?>
<languages>
  <lang code="en">English</lang>
  <lang code="es">Español</lang>
  <lang code="fr">Française</lang>
</languages>';

try {
  $res = $pxv->sendXML($xml, $options);
  file_put_contents('file.pdf', $res->file);
  echo 'File created: ' . $file;
} catch (Exception $e) {
  die($e->getMessage());
}


# Install prexview with: pip install prexview
# Set environment var PXV_API_KEY with the API_KEY
# coding: utf-8
from prexview import Prexview

pxv = Prexview()
options = dict(template='custom-invoice', output='pdf')

xml = '''<?xml version="1.0" encoding="UTF-8"?>
<languages>
  <lang code="en">English</lang>
  <lang code="es">Español</lang>
  <lang code="fr">Française</lang>
</languages>'''

file = 'file.pdf'

try:
  res = pxv.sendXML(xml, options)
  with open(file, 'wb') as f:
    f.write(res['file'])
    f.close()
  print 'File created:', file
except Exception as e:
  print e


require 'prex_view'

def send_request
  xml = '<?xml version="1.0" encoding="UTF-8"?>
    <languages>
      <lang code="en">English</lang>
      <lang code="es">Español</lang>
      <lang code="fr">Française</lang>
    </languages>'

  code, response = PrexView.send_xml(xml, { type: 'xml', template: "custom-invoice" })

  if ("200".."299").to_a.include? code
    save_in_filesystem response, 'pdf'
  elsif ("400".."499").to_a.include? code
    save_in_filesystem response, 'txt'
  end
end

def save_in_filesystem bytes, ext
  File.open("file.#{ext}", 'wb') { |output|
    output << bytes
  }
end

def main
  send_request
end

main


# Try running this locally.
public static ClientResponse SendSimpleMessage() {
    Client client = Client.create();
    client.addFilter(new HTTPBasicAuthFilter(
        "api","key-3ax6xnjp29jd6fds4gc373sgvjxteol0"));
    WebResource webResource = client.resource(
        "https://api.mailgun.net/v3/samples.mailgun.org/messages");
    MultivaluedMapImpl formData = new MultivaluedMapImpl();
    formData.add("from", "Excited User ");
    formData.add("to", "devs@mailgun.net");
    formData.add("subject", "Hello");
    formData.add("text", "Testing some Mailgun awesomeness!");
    return webResource.type(MediaType.APPLICATION_FORM_URLENCODED).
        post(ClientResponse.class, formData);
}


# Try running this locally.
public static RestResponse SendSimpleMessage() {
    RestClient client = new RestClient();
    client.BaseUrl = "https://api.mailgun.net/v3";
    client.Authenticator = new HttpBasicAuthenticator(
        "api","key-3ax6xnjp29jd6fds4gc373sgvjxteol0");
    RestRequest request = new RestRequest();
    request.AddParameter("domain",
                        "samples.mailgun.org", ParameterType.UrlSegment);
    request.Resource = "{domain}/messages";
    request.AddParameter("from", "Excited User ");
    request.AddParameter("to", "devs@mailgun.net");
    request.AddParameter("subject", "Hello");
    request.AddParameter("text", "Testing some Mailgun awesomeness!");
    request.Method = Method.POST;
    return client.Execute(request);
}

Useful features

Design and create your documents with tools that are useful and simple to use.

Graphics

Create amazing visualization charts, barcodes, QR codes.

Fonts and icons

Get better look and readability with our fonts and icons.

Document layout control

Our tools are simple to use give you great control over the document.

Data logic helpers

Buil-in functions to transform data from XML and JSON

You are in good hands!

Get support

When you need it with dedicated experts.

Services

Custom software integration and template creation.

Enterprise

Operate on one license per server to run on AWS or Google Cloud.