Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Web Server Framework for JasperReports
Branch: master
Failed to load latest commit information.
.bundle Added xls option type
bin update casper server removed trinidad
lib updated version
spec Added xls option type
.gitignore remove casperreports
.rspec first commit
.rvmrc first commit
Gemfile update spec
Gemfile.lock update spec
LICENSE update casper reports
casper-server.gemspec updated version first commit updated version to 0.1.0

Casper Server

What is this?

Casper Server is a Sinatra Web Server that provides an interface to the Casper Reports library.

With this server you can send a jrxml template, a xml document and a xpath string.

Install Gem

gem install casper_server


  • Java
  • JRuby
  • Rack
  • RVM

How do I create a Casper Server?

casper-server [name]

How do I run the Casper Server?

cd [name]


POST / {content-type:application/json}
    "jrxml": <base64 encoded jrxml document>,
    "data": <base64 encoded xml document>,
    "xpath": <xpath query string>
    "type": ('pdf','xls')

(XML VERSION CURRENTLY NOT WORKING!!! - should be implemented in 0.2.0)

POST / {content-type:application/xml}
  <jrxml><![CDATA[{insert jrxml document here}]]></jrxml>
  <data><![CDATA[{insert xml document here}]]></data>
  <xpath><![CDATA[{insert xpath string here}]]></xpath>
  <type><![CDATA[{'pdf' or 'xls'}]></type>

  <base64><![CDATA[{base64encoded pdf string}]]></base64>




On the web page you will be presented with three inputs and a process button.

The first input will be requesting the jrxml file
The second input will be requesting the xml document
The third input will be requesting xpath query string
The fourth input will be requesting the report type (pdf, xls)

Click Generate Report, and a pdf/xls should stream to your browser.

Something went wrong with that request. Please try again.