Currently, athenapdf
is packaged, and distributed as a Docker image.
Before starting, ensure your Docker environment is set up, and ready-to-use. For OSX / Windows users, ensure your Docker Machine is prepared, and the appropriate environment variables are established.
It can be installed using:
docker pull arachnysdocker/athenapdf
You can run the same command above to get updates.
docker run --rm -v $(pwd):/converted/ arachnysdocker/athenapdf athenapdf <input_path> [output_path]
The <input_path>
can either be a local HTML file or a URL to a web page.
The [output_path]
is optional. If it is not specified, the output path is set to the current working directory with a SHA1 hash of the file / URL as its file name.
Due to a recent change in Docker v1.10.0, you will have to add --security-opt seccomp:unconfined
after docker run
to suppress the libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Operation not permitted
error which may prevent you from successfully generating a PDF.
For Windows users, binding a volume with the preceding command may cause an error when using Git Bash / MinGW. In that case, adding an additional forward slash before the volume will remove the error:
docker run --rm -v /$(pwd):/converted/ arachnysdocker/athenapdf athenapdf <input_path> [output_path]
Alternatively, if using the Windows command prompt, $(pwd)
must be replaced by %cd%
:
docker run --rm -v %cd%:/converted/ arachnysdocker/athenapdf athenapdf <input_path> [output_path]
docker run --rm -v $(pwd):/converted/ arachnysdocker/athenapdf athenapdf local_file.html
docker run --rm -v $(pwd):/converted/ arachnysdocker/athenapdf athenapdf http://blog.arachnys.com/
To see a list of available CLI options:
docker run --rm -v $(pwd):/converted/ arachnysdocker/athenapdf athenapdf --help
For example, you can write the output of the conversion to standard output using the -S
flag, e.g.
docker run --rm -v $(pwd):/converted/ arachnysdocker/athenapdf athenapdf -S http://blog.arachnys.com/
There is also a flag for rendering a HTML document to a screen reader / mobile-friendly PDF. It is perfect for news articles, and blog posts. See aggressive.md.
See tips.md
.