View Single Post
Old 01-09-2021, 01:02 AM   #4
NiMa
Fanatic
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 507
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by Shohreh View Post
Hello,

I occasionally have to download a bunch of web pages, turn them into PDF, and merge them all into a single PDF file.

Do you know of a way to automate that?

1. From list, download web pages including pictures: wget ?

2. Convert each into PDF: cpdf/mutool/qpdf?

3. Merge all into single PDF:
Code:
@echo off
setlocal enabledelayedexpansion
set f=
for %%f in (*.pdf) do set f=!f! "%%f"
echo %f%
mutool merge -o full.pdf -O compress %f%
Thank you.
You can feed a list to wget by appending the "--input-file=" option to the command line. E.g. I have a file (wget-list):
Code:
x.y/a.pdf
x.y/b.pdf
I'd do:
Code:
wget --input-file=wget-list
Very useful, especially when downloading multiple files.
NiMa is offline   Reply With Quote