Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Home

headius edited this page · 2 revisions
Clone this wiki locally

The maven_gem project is a command and RubyGems plugin that allows you to install Maven artifacts as RubyGems.

Install:

gem install maven_gem

Usage:

gem maven group_id artifact_id version

as in

$ gem maven itext itext 1.3.1
Successfully installed itext-1.3.1-java
1 gem installed
Installing ri documentation for itext-1.3.1-java...
Installing RDoc documentation for itext-1.3.1-java...

The resulting gem can then be used as a normal library:

require 'rubygems'
require 'itext'

import com.lowagie.text.pdf.PdfWriter
import com.lowagie.text.Document
import com.lowagie.text.Paragraph

file = File.open('Hello.pdf', 'w')
document = Document.new
writer = PdfWriter.get_instance(document, file.to_outputstream)
paragraph = Paragraph.new('Hello iText!')

document.open
document.add(paragraph)
document.close
Something went wrong with that request. Please try again.