i have this code:
require 'java'
require 'iText-5.0.6.jar'
module Pdf
include_package "com.itextpdf.text.pdf"
include_package "java.io"
def self.write
reader = PdfReader.new('application.pdf');
stamper = PdfStamper.new(reader, FileOutputStream.new('completed.pdf'))
form = stamper.acro_fields
puts "Form has these fields: #{form.fields.key_set.to_a}"
form.set_field("some_zipcode_field", "94115")
stamper.close
end
end
Pdf.write
in jRuby and i want to translate to Ruby, using rjb
anyone nows how can i do that?
t understand... i cant use jruby on production, thats why i need RJB to use jruby code. but i dont now how to do that...