Method: Pdfcrowd::PdfToPdfClient#addPdfFile

Defined in:
lib/pdfcrowd.rb

#addPdfFile(file_path) ⇒ Object

Add a PDF file to the list of the input PDFs.

  • file_path - The file path to a local PDF file. The file must exist and not be empty.

  • Returns - The converter object.



3923
3924
3925
3926
3927
3928
3929
3930
3931
# File 'lib/pdfcrowd.rb', line 3923

def addPdfFile(file_path)
    if (!(File.file?(file_path) && !File.zero?(file_path)))
        raise Error.new(Pdfcrowd.create_invalid_value_message(file_path, "addPdfFile", "pdf-to-pdf", "The file must exist and not be empty.", "add_pdf_file"), 470);
    end
    
    @files['f_%s' % @file_id] = file_path
    @file_id += 1
    self
end