Docgen.io

API for generating documents




About Docgen.io


Docgen.io is a document generating API

With a few API calls you can streamline the generation of high quality PDFs

Docgen.io uses latex to generate the PDFs and Mustache for templating



Technical details

  • This api follows the jsonapi specifications
  • The documentation is available here
  • We built a ruby client gem. available here

Quick start

General

Refer to the API documentation here

Ruby

add the following to your Gemfile

gem 'docgen_io_client', git:'https://github.com/nicholasjstock/docgen_io_client.git', branch: 'master'

in the terminal run

bundle

Set DOCGEN_API_KEY env variable with a docgen.io api key

document = DocgenIoClient::Document.create(
  texfile:"contents <% field_name %> of a tex file"
)

render =  DocgenIoClient::TemplateRender.create(
  document: document,
  params: {
    "field_name":"asdfasdfasdfadsf"
  }
)


if the generation of the file happened successfully it will be stored in render.pdf

Sinatra example

get '/pdf' do
  id = params['template_render_id']
  template_render = DocgenIoClient::TemplateRender.find(id)
  content_type 'application/pdf'
  response.write(template_render.pdf.read)
end

Pricing

  • No monthly fee, no subscription, you pay (or not) each month according to your use of the service.
  • 0-10 renders: Free
  • 11-50 renders: $2.50 that month
  • 51-100 renders: $12 that month
  • 101-1000 renders: $85 that month
  • 1001-10000 renders: $500 that month
  • and beyond, auditing… contact us


Try me