svg-in-har2pdf

Crates.iosvg-in-har2pdf
lib.rssvg-in-har2pdf
version0.2.0
created_at2025-08-01 19:11:10.190931+00
updated_at2025-08-01 19:21:50.06894+00
descriptionExtract SVGZ from HAR archive and make a PDF
homepage
repositoryhttps://codeberg.org/slundi/MY_PROJECT
max_upload_size
id1777387
size34,946
slundi (slundi)

documentation

README

SVGZ in HAR to PDF

Convert all SVGZ in a HAR archive to a single PDF.

Motivation

My wife suscribed to an electronic magazine but she often do not have time to read everything. So I made this tool to download the magazines for an offline reading.

Requirements

gzip command must be available on your system

To convert SVGZ to PDF, you need one of the listed tool:

  • Inkscape
  • rsvg-convert
  • cairo If you have more than one of the listed tool, you can force the usage of one using --converter-inkscape or --converter-rsvg or --converter-cairo when using the CLI.

To merge PDF, you need one of the 2 tools:

  • PDFTK
  • GhostScript You can also force using --merge-with-pdftk or --merge-with-gs.

Usage

1. Create an HAR archive

  1. Go on the page before the one you need to read your stuff
  2. Follow this guide to open the developper console on the Network tab
  3. Browse the page (don't go back or skip the order is important to have page ordered in the final PDF)
  4. Once done, save the HAR archive using the guide
  5. If you want to have multiple magazine (so 1 per HAR archive), click on the trash bin to clear the network tab, then step 1 again

Then:

# Force Inkscape & pdftk
./har_to_pdf /path/to/har/folder --converter-inkscape --merge-with-pdftk

# Force rsvg-convert & ghostscript
./har_to_pdf /path/to/har/folder --converter-rsvg --merge-with-gs -o /output/folder

# Auto mode (default behaviour)
./har_to_pdf /path/to/har
Commit count: 0

cargo fmt