Method: PDFDirectPrint::CommandLine#process_file

Defined in:
lib/pdfdprint/command_line.rb

#process_fileObject



69
70
71
72
73
74
75
76
77
78
# File 'lib/pdfdprint/command_line.rb', line 69

def process_file
  puts "[INFO]: Processing file #{ARGV[0]}"
  pdf = RawPrint.new(options)
  if pdf.print(ARGV[0])
    puts "[INFO]: Succesfully printed file #{ARGV[0]}"
    options.key?(:move) && move_file_to_dir(ARGV[0], options[:move])
  else
    puts "[ERROR]: Failed to print due to #{pdf.error_message}"
  end
end