Method: Pdfcrowd::HtmlToPdfClient#setDataFormat

Defined in:
lib/pdfcrowd.rb

#setDataFormat(data_format) ⇒ Object



1780
1781
1782
1783
1784
1785
1786
1787
# File 'lib/pdfcrowd.rb', line 1780

def setDataFormat(data_format)
    unless /(?i)^(auto|json|xml|yaml|csv)$/.match(data_format)
        raise Error.new(Pdfcrowd.create_invalid_value_message(data_format, "setDataFormat", "html-to-pdf", "Allowed values are auto, json, xml, yaml, csv.", "set_data_format"), 470);
    end
    
    @fields['data_format'] = data_format
    self
end