instance method
draw_first_page_from
Ruby on Rails 7.1.6
Since v5.2.8.1 PrivateSignature
draw_first_page_from(file, &block)
No documentation comment.
Parameters
-
filereq -
blockblock
Source
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 30
def draw_first_page_from(file, &block)
# use 72 dpi to match thumbnail dimensions of the PDF
draw self.class.pdftoppm_path, "-singlefile", "-cropbox", "-r", "72", "-png", file.path, &block
end
Defined in activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb line 30
· View on GitHub
· Improve this page
· Find usages on GitHub