Method: Pdfcrowd::HtmlToPdfClient#setMultipageBackgroundUrl

Defined in:
lib/pdfcrowd.rb

#setMultipageBackgroundUrl(url) ⇒ Object

Load a file from the specified URL and apply each page of the file as a background to the corresponding page of the output PDF. A background can be either a PDF or an image.

  • url - Supported protocols are http:// and https://.

  • Returns - The converter object.



1427
1428
1429
1430
1431
1432
1433
1434
# File 'lib/pdfcrowd.rb', line 1427

def setMultipageBackgroundUrl(url)
    unless /(?i)^https?:\/\/.*$/.match(url)
        raise Error.new(Pdfcrowd.create_invalid_value_message(url, "setMultipageBackgroundUrl", "html-to-pdf", "Supported protocols are http:// and https://.", "set_multipage_background_url"), 470);
    end
    
    @fields['multipage_background_url'] = url
    self
end