JAVA Version ========== byte[] b = JasperRunManager.runReportToPdf("myrep.jasper", map, connection); String s = new String(b) // I have also tried new String(b, "UTF8") and various other encodings // Save s to file ... looks like a PDF file (i.e. begins %PDF etc.) but a few characters not converted correctly in some data - so get blank page Now.... when I call the Jasper functions through Ruby using yajb ... RUBY Version (calling Java JasperReports API) =========== runManager = jstatic :JasperRunManager bytes = [] bytes = runManager.runReportToPdf('myrep.jasper', map, connection) File.open( 'new_foo.pdf', 'wb' ) do |output| output.print bytes.pack("c*") end It works! The file is translated correctly. Any idea why the Java version is not working? Any pointers would be helpful.