bagasprstyadi

bagasprstyadi

Elixir PDF Generator Failed to Render the String of HTML

Hi, I have a problem when creating PDF using elixir-pdf-generator from this library GitHub - gutschilla/elixir-pdf-generator: Create PDFs with wkhtmltopdf or puppeteer/chromium from Elixir. · GitHub

Basically I already followed all the instruction and use the wkhtmltopdf. When I tried to create it using the example.

PdfGenerator.generate {:url, "http://google.com"}, page_size: "A5"

What I get is a PDF that is the page of google but all the string are blank (failed to render)

Can anyone help me? I’m currently stuck here

This also happened when I create using the html stirng from my local device.

Most Liked

maltoe

maltoe

Not really on topic, but:

Last time I looked into it, wkhtmltopdf didn’t look like a healthy project very much: still using ancient QtWebkit, not much development happening, etc. They have a pretty good writeup on the library’s status on their homepage wkhtmltopdf, which didn’t exactly makes you want to start using it for new projects either. I can only recommend switching to a recent Chrome/Chromium as your rendering engine, if you can. There are a few libraries in Elixir-land that have support for it, and it might solve your rendering issues as well.

olivermt

olivermt

This seems fantastic.

tessi

tessi

This blog post gives a little more insight on different PDF printers from a performance perspective:

It seems that ChromicPDF is up to 60 times faster for small PDFs than pdf_generator (and even faster compared to pupeteer_pdf).

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement