readme.md in casperreports-0.0.3 vs readme.md in casperreports-0.0.4

- old
+ new

@@ -2,34 +2,38 @@ (Still in Development Mode...) Is a jruby library that takes a jrxml document, a xmldocument, and a xpath selection string, to create a pdf report. +# Requirements + +This gem requires jruby > 1.6.0 + # Install ``` ruby -curl -O http://casper-gem.s3.amazonaws.com/casper-0.0.1.gem -gem install casper-0.0.1.gem +gem install casperreports ``` # Input * JasperReport Template or jrxml file * Xml Data * XPath Selection +* Document type ['pdf','xls'] # Process Casper will use the JasperReports library to compile and return a pdf. # Output A pdf document in string of bytes -# Example +# Usage Examples movie_jrxml = open('moviereport.jrxml').read movies = open('movies.xml').read -pdf_string = Casper.new.compile(movie_jrxml, movies, '//movie') +pdf_string = Casper.new.compile(movie_jrxml, movies, '//movie', 'pdf') open('movie.pdf', 'wb').write(pdf_string)