Method: PDFToImage::Image#save

Defined in:
lib/pdftoimage/image.rb

#save(outname) ⇒ Object

Saves the converted image to the specified location

Parameters:

  • outname (String)

    The output filename of the image



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/pdftoimage/image.rb', line 69

def save(outname)
    generate_temp_file

    cmd = "convert "

    if not @args.empty?
        cmd += "#{@args.join(' ')} "
    end

    cmd += "#{Shellwords.escape(@filename)} #{Shellwords.escape(outname)}"

    PDFToImage.exec(cmd)

    return true
end