Skip to content

@babatz /checkbox_test.pdf forked from bradediger/checkbox_test.pdf
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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:
# http://www.fileformat.info/info/unicode/char/2610/fontsupport.htm
font "fonts/dejavu/ttf/DejaVuSans.ttf"
text "#{CHECKBOX} Not done yet"
text "#{FILLED_CHECKBOX} Complete!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.