Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Web Server Framework for JasperReports

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 .bundle
Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 casper-server.gemspec

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.