Sha256: 69eb00206c52e9af478031a63c3bb203bccd03bd511412f0e0683df984ffb8ae

Contents?: true

Size: 353 Bytes

Versions: 77

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

77 entries across 77 versions & 1 rubygems

Version Path
hexapdf-0.15.6 examples/001-hello_world.rb
hexapdf-0.15.5 examples/001-hello_world.rb
hexapdf-0.15.4 examples/001-hello_world.rb
hexapdf-0.15.3 examples/001-hello_world.rb
hexapdf-0.15.2 examples/001-hello_world.rb
hexapdf-0.15.1 examples/001-hello_world.rb
hexapdf-0.15.0 examples/001-hello_world.rb
hexapdf-0.14.4 examples/001-hello_world.rb
hexapdf-0.14.3 examples/001-hello_world.rb
hexapdf-0.14.2 examples/001-hello_world.rb
hexapdf-0.14.1 examples/001-hello_world.rb
hexapdf-0.14.0 examples/001-hello_world.rb
hexapdf-0.13.0 examples/001-hello_world.rb
hexapdf-0.12.3 examples/001-hello_world.rb
hexapdf-0.12.2 examples/001-hello_world.rb
hexapdf-0.12.1 examples/001-hello_world.rb
hexapdf-0.12.0 examples/001-hello_world.rb