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.35.0 examples/001-hello_world.rb
hexapdf-0.34.1 examples/001-hello_world.rb
hexapdf-0.34.0 examples/001-hello_world.rb
hexapdf-0.33.0 examples/001-hello_world.rb
hexapdf-0.32.2 examples/001-hello_world.rb
hexapdf-0.32.1 examples/001-hello_world.rb
hexapdf-0.32.0 examples/001-hello_world.rb
hexapdf-0.31.0 examples/001-hello_world.rb
hexapdf-0.30.0 examples/001-hello_world.rb
hexapdf-0.29.0 examples/001-hello_world.rb
hexapdf-0.28.0 examples/001-hello_world.rb
hexapdf-0.27.0 examples/001-hello_world.rb
hexapdf-0.26.2 examples/001-hello_world.rb
hexapdf-0.26.1 examples/001-hello_world.rb
hexapdf-0.26.0 examples/001-hello_world.rb
hexapdf-0.25.0 examples/001-hello_world.rb
hexapdf-0.24.2 examples/001-hello_world.rb
hexapdf-0.24.1 examples/001-hello_world.rb
hexapdf-0.24.0 examples/001-hello_world.rb
hexapdf-0.23.0 examples/001-hello_world.rb