Sha256: c2d12760996d4cc60970baadd97b8558fbab9d5046fa8a815cc7ec640c7a8828

Contents?: true

Size: 610 Bytes

Versions: 5

Compression:

Stored size: 610 Bytes

Contents

#--
# PDF::Writer for Ruby.
#   http://rubyforge.org/projects/ruby-pdf/
#   Copyright 2003 - 2005 Austin Ziegler.
#
#   Licensed under a MIT-style licence. See LICENCE in the main distribution
#   for full licensing information.
#
# $Id: hello.rb,v 1.6 2005/06/13 19:32:37 austin Exp $
#++
begin
  require 'pdf/writer'
rescue LoadError => le
  if le.message =~ %r{pdf/writer$}
    $LOAD_PATH.unshift("../lib")
    require 'pdf/writer'
  else
    raise
  end
end

pdf = PDF::Writer.new
pdf.select_font "Times-Roman"
pdf.text "Hello, Ruby.", :font_size => 72, :justification => :center

pdf.save_as("hello.pdf")

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pdf-writer-1.1.3 demo/hello.rb
pdf-writer-1.0.1 demo/hello.rb
pdf-writer-1.1.2 demo/hello.rb
pdf-writer-1.1.0 demo/hello.rb
pdf-writer-1.1.1 demo/hello.rb