
Show HN: Athena, drop-in replacement for wkhtmltopdf using Docker, Electron and Go - dbuxton
http://athenapdf.com/
======
ashkulz
Hello, current maintainer of wkhtmltopdf here. This looks like an interesting
approach, as Qt/WebKit is effectively unsupported. wkhtmltopdf is further
hampered by the fact that a lot of the functionality requires a patched Qt
version, which hasn't been ported to Qt 5.x.

Switching to Blink is obvious, but which wrapper to use (CEF, Electron, etc)
is hard to decide. Because they all use a multi process architecture,
supporting the API around which the tools are built is not really possible.
Time to work on it has also been in short supply in recent times.

So, good work by the authors. Wish we could get something better, but as long
as browsers move at the pace they do, it's going to be tough.

~~~
dbuxton
Thanks for all your good (and hard!) work on wkhtmltopdf - it sets a high bar
for usefulness. We'd love your input on areas that you think could be improved
in Athena.

------
mrweasel
Cool project, but firing up docker to convert a website to a PDF is just
silly.

~~~
numbsafari
Using docker means that you don't have to install any of these dependencies on
your computer, and, if it's setup correctly, it runs sandboxes from the rest
of my system. So it's not just about the "overhead".

~~~
dsr_
Does docker have a single system to report included libraries up to
management, so that when, for example, there's a major hole in openssl or
nginx or a php library or the Chromium engine, I will immediately know which
docker images are vulnerable and which I don't have to worry about?

Because until that happens, the only way I can run docker images is when I've
created them myself... and even then I really need a tool that does the above,
so that I can rebuild them when the next CVE comes around.

~~~
numbsafari
... so build them yourself. And keep them in your own repository. And build
them on a base that you have analyzed. You can probably use whatever tooling
you are using for that purpose today. They aren't voodoo.

------
brbsix
wkhtmltopdf frustrates me to no end. I've even got a wrapper script to help
iterate through it's various major versions and option flags in an attempt to
get usable PDFs. I really hope this is a significant improvement.

~~~
sarreph
Agreed (and same).

I get that it's hard to convert web elements (via Chrome) to a readable/nice
PDF, but wkhtmltopdf really isn't the miracle tool it is made out to be. Like
you, I have to tweak the options majorly, and even then it fails to support
proper page breaks between text lines (i.e. a line of text that is cut across
a page break looks so unprofessional).

We are in need of a true web to PDF conversion tool; it's one of those things
that is overlooked in the business sector but represents quite a valuable
niche.

~~~
dbuxton
Please stress-test and feel free to submit problem cases as issues to the
github repo [0].

"Aggressive mode", which leverages Chromium's "simplify page" mode, might do
some of what you want, but typically you need some of the funky print css
classes to enforce widows/orphans.

The main reason we have built this however is that wkhtmltopdf just crashes
all the time. Other commenters seem to agree. We'd love feedback on whether
Athena works in cases that other tools fail, as well as on quality of
conversion.

[0]:
[https://github.com/arachnys/athenapdf](https://github.com/arachnys/athenapdf)

------
dsr_
If I've followed all the trails correctly, this is essentially a docker image
of a wrapper around Chromium in order to print HTML to PDF.

wkhtmltopdf uses a WebKit browser to print HTML to PDF.

------
web007
This isn't a package replacement, it's a microservice in a Docker container.

Replacing one package with three is nothing to be proud of. Replacing one with
13 plus wrapper code [1] is utterly ridiculous.

I don't know the background of this project, so there may be some important
detail I'm missing, but it seems they would have done better to set up a
stable wkhtmltopdf Dockerfile microservice instead, and avoid all of the
wrapper code entirely. Cool as a demo of what's possible with tech today; less
cool as a demo of how many hoops you can jump through to reproduce existing
functionality.

[1]
[https://github.com/arachnys/athenapdf/blob/master/cli/Docker...](https://github.com/arachnys/athenapdf/blob/master/cli/Dockerfile)

