Mobileread
Download list of web pages → convert to PDF → merge?
#1  Shohreh 01-04-2021, 06:57 PM
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.
Reply 

#2  Doitsu 01-05-2021, 03:05 AM
Have you considered generating an .epub book with dotepub and converting it to a .pdf file with Calibre?
Reply 

#3  Quoth 01-05-2021, 02:29 PM
Or just having the epub!
Reply 

#4  NiMa 01-09-2021, 02:02 AM
Quote Shohreh
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.
Reply 

#5  Shohreh 01-09-2021, 11:09 PM
Thanks for the infos. I forgot to say I'd rather a desktop solution than web-based.

After feeding wget a list of URLs, HTML pages can then be turned into individual PDFs with wkhtmltopdf, and merged into a single PDF with cpdf/qpdf/mutool.
Reply 

Today's Posts | Search this Thread | Login | Register