Method: Pdfcrowd::HtmlToImageClient#setOutputFormat

Defined in:
lib/pdfcrowd.rb

#setOutputFormat(output_format) ⇒ Object



2099
2100
2101
2102
2103
2104
2105
2106
# File 'lib/pdfcrowd.rb', line 2099

def setOutputFormat(output_format)
    unless /(?i)^(png|jpg|gif|tiff|bmp|ico|ppm|pgm|pbm|pnm|psb|pct|ras|tga|sgi|sun|webp)$/.match(output_format)
        raise Error.new(Pdfcrowd.create_invalid_value_message(output_format, "setOutputFormat", "html-to-image", "Allowed values are png, jpg, gif, tiff, bmp, ico, ppm, pgm, pbm, pnm, psb, pct, ras, tga, sgi, sun, webp.", "set_output_format"), 470);
    end
    
    @fields['output_format'] = output_format
    self
end