(image-to-file {image :image
image-index :image-index
ext :ext
dpi :dpi
quality :quality
base-path :base-path})
(pdf-2-images image-handler
&
{:keys [page start-page end-page dpi quality ext pdf-file
pathname]
:or {start-page (if page page 0)
end-page (if page page (Integer/MAX_VALUE))
dpi 300
quality 1
ext "png"}})
Converts a page range of a PDF document to images using one of the defined image handlers:
image-to-image image-to-byte-array image-to-file
Or pass in a custom one. Returns a sequence consisting of the images, byte arrays or pathnames depending on the selected image handler.
Options are key-value pairs and may be one of: :page - Page to convert to image, takes precedence over :start-page and :end-page :start-page - The start page, defaults to 0 :end-page - The end page, defaults to PDF's pages length - 1 or Integer/MAX_VALUE :dpi - Screen resolution, defaults to 300 :quality - Quality to be used when compressing the image (0 < quality < 1), defaults to 1 :ext - The target file format, defaults to png :pdf-file - A PDF java.io.File, takes precedence over :pathname :pathname - Path to the PDF file, used if :pdf-file is not specified (= nil)
Converts a page range of a PDF document to images using one of the defined image handlers: image-to-image image-to-byte-array image-to-file Or pass in a custom one. Returns a sequence consisting of the images, byte arrays or pathnames depending on the selected image handler. Options are key-value pairs and may be one of: :page - Page to convert to image, takes precedence over :start-page and :end-page :start-page - The start page, defaults to 0 :end-page - The end page, defaults to PDF's pages length - 1 or Integer/MAX_VALUE :dpi - Screen resolution, defaults to 300 :quality - Quality to be used when compressing the image (0 < quality < 1), defaults to 1 :ext - The target file format, defaults to png :pdf-file - A PDF java.io.File, takes precedence over :pathname :pathname - Path to the PDF file, used if :pdf-file is not specified (= nil)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close