Method: CombinePDF.parse

Defined in:
lib/combine_pdf/api.rb

.parse(data, options = {}) ⇒ Object

Create a PDF object from a raw PDF data (parsing the data).

data

is a string that represents the content of a PDF file.

Raises:

  • (TypeError)


38
39
40
41
# File 'lib/combine_pdf/api.rb', line 38

def parse(data, options = {})
  raise TypeError, "couldn't parse and data, expecting type String" unless data.is_a? String
  PDF.new(PDFParser.new(data, options))
end