-
-
Save anonymous/59b446c37c2619ca6461 to your computer and use it in GitHub Desktop.
This file contains 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
# Converts a TIFF to PDF using tiff2pdf | |
def tiff2pdf(tiff_data) | |
cmd = %W[tiff2pdf -p A4 -c FFM -t #{@timestamp}] | |
file_to_convert = Tempfile.new('ffm') | |
file_to_convert.write(tiff_data) | |
file_to_convert.rewind | |
# begin | |
`#{cmd.join(' ')} #{file_to_convert.path}` | |
ensure | |
file_to_convert.close | |
file_to_convert.unlink | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment