Created
February 20, 2019 09:54
-
-
Save bright23/e5d5a2ca7e7c62a6ae9c797ac6374288 to your computer and use it in GitHub Desktop.
make pdf sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "prawn" | |
f_name = File.basename(__FILE__, ".rb")+".pdf" | |
Prawn::Document.generate(f_name) { | |
stroke_axis | |
} | |
binary_text = IO.read("#{f_name}", mode: 'rb').force_encoding("utf-8") | |
#text.encode("UTF-8") | |
puts("#{binary_text}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment