class DragonflyPdf::Processors::SubsetFonts
Public Instance Methods
call(content, _opts = {})
click to toggle source
# File lib/dragonfly_pdf/processors/subset_fonts.rb, line 4 def call(content, _opts = {}) raise UnsupportedFormat unless content.ext raise UnsupportedFormat unless SUPPORTED_FORMATS.include?(content.ext.downcase) content.shell_update(ext: 'pdf') do |old_path, new_path| "#{gs_command} -o \"#{new_path}\" -f \"#{old_path}\"" end end
Private Instance Methods
gs_command()
click to toggle source
# File lib/dragonfly_pdf/processors/subset_fonts.rb, line 15 def gs_command 'gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSubsetFonts=true' end