Sha256: 69eb00206c52e9af478031a63c3bb203bccd03bd511412f0e0683df984ffb8ae

Contents?: true

Size: 353 Bytes

Versions: 76

Compression:

Stored size: 353 Bytes

Contents

# # Hello World
#
# This simple example mimics the classic "hello world" examples from
# programming languages.
#
# Usage:
# : `ruby hello_world.rb`
#

require 'hexapdf'

doc = HexaPDF::Document.new
canvas = doc.pages.add.canvas
canvas.font('Helvetica', size: 100)
canvas.text("Hello World!", at: [20, 400])
doc.write("hello_world.pdf", optimize: true)

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
hexapdf-0.22.0 examples/001-hello_world.rb
hexapdf-0.21.1 examples/001-hello_world.rb
hexapdf-0.21.0 examples/001-hello_world.rb
hexapdf-0.20.4 examples/001-hello_world.rb
hexapdf-0.20.3 examples/001-hello_world.rb
hexapdf-0.20.2 examples/001-hello_world.rb
hexapdf-0.20.1 examples/001-hello_world.rb
hexapdf-0.20.0 examples/001-hello_world.rb
hexapdf-0.19.3 examples/001-hello_world.rb
hexapdf-0.19.2 examples/001-hello_world.rb
hexapdf-0.19.1 examples/001-hello_world.rb
hexapdf-0.19.0 examples/001-hello_world.rb
hexapdf-0.18.0 examples/001-hello_world.rb
hexapdf-0.17.3 examples/001-hello_world.rb
hexapdf-0.17.2 examples/001-hello_world.rb
hexapdf-0.16.0 examples/001-hello_world.rb
hexapdf-0.15.9 examples/001-hello_world.rb
hexapdf-0.15.8 examples/001-hello_world.rb
hexapdf-0.15.7 examples/001-hello_world.rb
hexapdf-0.15.6 examples/001-hello_world.rb