msantoshdora
Elixir libraries for converting docs
Recently am working with a scenario where I need to convert a JSON payload into HTML and then convert it to PDF. While working on it I came across - elixir-pdf-generator library(GitHub - gutschilla/elixir-pdf-generator: Create PDFs with wkhtmltopdf or puppeteer/chromium from Elixir.).
It made me curious what if someone wants to convert it into different file formats like docx. Do we have any general library for handling different scenarios??
Most Liked
Sebb
For PDFs I’d recommend data |> heex |> HTML+CCS3-paged-media |> prince/docraptor
most cost effective processor for CSS3 paged media. ca 800$ for a local licence.
docraptor is an easy to use webservice backed by prince. (about 10ct per PDF)
very good resource for print-css: https://www.print-css.rocks/
Tutorial and benchmarks of processors (also free ones)
For .docx there is pandoc, which has a Elixir wrapper that I never used.
dogweather
100% for that workflow. I did the equivalent with Python -> Handlebars templates -> wkhtmltopdf and it worked well for moderately complex PDF docs:








