Pdf2htmlex
Provides functions to convert PDF documents to HTML. The command line tool pdf2HtmlEX must be installed and needs to be added to your PATH.
## Examples
iex(1)> Pdf2htmlex.open("test/fixtures/simple.pdf") |> Pdf2htmlex.convert_to!("/tmp")
iex(2)> Pdf2htmlex.open("test/fixtures/simple.pdf") |> Pdf2htmlex.zoom(2.0) |> Pdf2htmlex.convert_to!("/tmp")
Summary↑
convert_to!(opts, dir) | Converts the PDF with given options to a output directory |
externalize_css(opts) | Puts CSS in external files |
externalize_font(opts) | Puts fonts in external files |
externalize_image(opts) | Puts images in external files |
externalize_javascript(opts) | Puts Javascript in external files |
externalize_outline(opts) | Puts outline in external file |
first_page(opts, first) | First page to convert |
fit_height(opts, height) | Fit height to (in pixels) |
fit_width(opts, width) | Fit width to (in pixels) |
hdpi(opts, dpi) | Horizontal resolution for graphics in DPI (default: 144) |
last_page(opts, last) | Last page to convert |
open(pdf_path) | Adds the path to an input file (PDF) to a list that will be used to build up options that will be used for conversion |
split_pages(opts) | Puts every page in an external HTML file |
use_mediabox(opts) | Use CropBox instead of MediaBox |
vdpi(opts, dpi) | Vertical resolution for graphics in DPI (default: 144) |
zoom(opts, zoom_ratio) | Zoom ratio |
Functions
Converts the PDF with given options to a output directory
Puts CSS in external files
Puts fonts in external files
Puts images in external files
Puts Javascript in external files
Puts outline in external file
First page to convert
Fit height to (in pixels)
Fit width to (in pixels)
Horizontal resolution for graphics in DPI (default: 144)
Last page to convert
Adds the path to an input file (PDF) to a list that will be used to build up options that will be used for conversion.
Puts every page in an external HTML file
Use CropBox instead of MediaBox
Vertical resolution for graphics in DPI (default: 144)
Zoom ratio