Sha256: 5efea6f0cc7042977405604415143afe618d0cf20c3425241688fb0bbca842ca

Contents?: true

Size: 354 Bytes

Versions: 22

Compression:

Stored size: 354 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

22 entries across 22 versions & 1 rubygems

Version Path
hexapdf-0.11.9 examples/001-hello_world.rb
hexapdf-0.11.8 examples/001-hello_world.rb
hexapdf-0.11.7 examples/001-hello_world.rb
hexapdf-0.11.6 examples/001-hello_world.rb
hexapdf-0.11.5 examples/001-hello_world.rb
hexapdf-0.11.4 examples/001-hello_world.rb
hexapdf-0.11.3 examples/001-hello_world.rb
hexapdf-0.11.2 examples/001-hello_world.rb
hexapdf-0.11.1 examples/001-hello_world.rb
hexapdf-0.11.0 examples/001-hello_world.rb
hexapdf-0.10.0 examples/001-hello_world.rb
hexapdf-0.9.3 examples/001-hello_world.rb
hexapdf-0.9.2 examples/001-hello_world.rb
hexapdf-0.9.1 examples/001-hello_world.rb
hexapdf-0.9.0 examples/001-hello_world.rb
hexapdf-0.8.0 examples/001-hello_world.rb
hexapdf-0.7.0 examples/hello_world.rb
hexapdf-0.6.0 examples/hello_world.rb
hexapdf-0.5.0 examples/hello_world.rb
hexapdf-0.4.0 examples/hello_world.rb