Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require 'prawn'
CHECKBOX = "\xE2\x98\x90" # "☐"
FILLED_CHECKBOX = "\xE2\x98\x91" # "☑"
Prawn::Document.generate("checkbox_test.pdf") do
# Use a font with the checkbox characters:
font "fonts/dejavu/ttf/DejaVuSans.ttf"
text "#{CHECKBOX} Not done yet"
text "#{FILLED_CHECKBOX} Complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment