web2pdf_lib

Crates.ioweb2pdf_lib
lib.rsweb2pdf_lib
version0.1.0
sourcesrc
created_at2024-10-05 19:19:46.34928
updated_at2024-10-05 19:19:46.34928
descriptionA wrapper around chromiumoxide that allows for a more streamlined experience when creating PDFs
homepagehttps://github.com/Nathan-Mossaad/web2pdf
repositoryhttps://github.com/Nathan-Mossaad/web2pdf
max_upload_size
id1398400
size15,547
Nathan Mossaad (Nathan-Mossaad)

documentation

README

web2pdf

This project consists of two parts:

  1. A CLI tool that converts web pages to PDFs
  2. A wrapper around chromiumoxide that allows for a more streamlined experience when creating PDFs

The main new feature compared to other PDF converters is the ability to create a single page PDF, that fits to the content, instead of a standard multi-page PDF.

It also allows provides the ability to use screen instead of printing CSS, thereby converting exactly what the user sees on the screen.

Setup

  1. Install chromium
  2. cargo install web2pdf

Usage

For the CLI tool, run "web2pdf --help"

Examle usage:

web2pdf --mono --screen --disable-backgrounds "https://en.wikipedia.org/wiki/Rust_(programming_language)" rust.pdf

web2pdf "document.html" rust.pdf
(Warning: Paths relative to home are not supported e.g. ~/document.html but /home/user/document.html will work)

License

Licensed under either of these:

Commit count: 3

cargo fmt