Method: Pdfcrowd::HtmlToImageClient#setElementToConvert
- Defined in:
- lib/pdfcrowd.rb
#setElementToConvert(selectors) ⇒ Object
Convert only the specified element from the main document and its children. The element is specified by one or more CSS selectors. If the element is not found, the conversion fails. If multiple elements are found, the first one is used.
-
selectors- One or more CSS selectors separated by commas. The string must not be empty. -
Returns - The converter object.
2743 2744 2745 2746 2747 2748 2749 2750 |
# File 'lib/pdfcrowd.rb', line 2743 def setElementToConvert(selectors) if (!(!selectors.nil? && !selectors.empty?)) raise Error.new(Pdfcrowd.(selectors, "setElementToConvert", "html-to-image", "The string must not be empty.", "set_element_to_convert"), 470); end @fields['element_to_convert'] = selectors self end |