23 releases

0.2.0 Nov 6, 2024
0.1.9 Aug 11, 2024
0.1.7 Oct 18, 2023
0.1.5 May 9, 2023
0.0.12 Apr 28, 2023

#104 in Command line utilities

Download history 21/week @ 2024-09-12 15/week @ 2024-09-19 38/week @ 2024-09-26 8/week @ 2024-10-03 5/week @ 2024-10-10 3/week @ 2024-10-17 85/week @ 2024-10-31 67/week @ 2024-11-07 8/week @ 2024-11-14 6/week @ 2024-11-21 79/week @ 2024-11-28 317/week @ 2024-12-05

411 downloads per month

MIT/Apache

745KB
1.5K SLoC

Rust 1K SLoC // 0.0% comments Shell 341 SLoC // 0.5% comments

htop

Crates.io Code coverage build Linux build Windows build MacOs MIT licensed Apache 2.0 licensed Contributor Covenant

Overview

HTML to PDF converter based on headless_chrome, inspired by html2pdf.

In case of any problems while using htop, please see the Troubleshooting section or report a bug.

Installation

cargo install htop

Usage

Display shortened usage description

htop -h

Display detailed usage description

htop --help

Display the detailed description of a selected command

htop help <command>

Convert a single HTML file into a single PDF file

htop single input_file.html output_file.pdf

Convert multiple HTML files into multiple PDF files

htop multiple input_directory output_directory

Convert a single web page into a single PDF file

htop url https://dmntk.io

User guide

A detailed user guide is currently being prepared.

Troubleshooting

Printing PDF hangs forever

When htop is used in a multiuser environment (or in cloud), it may happen that the printing process hangs forever. The reason is that in Linux the crash report is created in directory /tmp/Crashpad. When another user have already used htop, then such directory already exists and the access rights are set only for the other user. headless_chrome hangs while trying to get access to this directory.

The simplest workaround is to delete this directory before running htop:

sudo rm -rf /tmp/Crashpad 

This might not work when multiple htop instances are started simultaneously. To avoid creating the directory with crash reports, run all simultaneous htop instances with the option --no-crash-reports set:

htop --no-crash-reports url https://dmntk.io

SELinux

It might happen, that SELinux will prevent chrome from using the 'execheap' accesses on a process. For Fedora Linux, this bug was reported here. VERY INSECURE workaround is to call:

sudo setsebool -N selinuxuser_execheap 1

See man setsebool for more details.

License

Licensed under either of

at your option.

Contribution

Any contributions to htop are greatly appreciated. All contributions intentionally submitted for inclusion in the work by you, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~9–20MB
~303K SLoC