Converting multiple html files to pdf files

Converting multiple html files to pdf files

Steve G. wordz2u at gmail.com
Sun Oct 30 01:58:54 IST 2011


Happy Halloween!

I have a large number of .htm files (text in English, Spanish or Hebrew
with punctuation marks) which I want to convert to .pdf or PDF files, so I
can read them on the Kindle.

I know how to do it manually - I open them in a browser, select Print-Print
to file - PDF, give a name and print. But as I have several hundred files,
it is not practical.

1. Is there a more automated, preferably command line, to take each file,
and convert it to from filename.htm to filename.pdf, while keeping the file
name?

2. Is there a way to control the output of the pdf file, so that the font
size is adequate for the kindle (I do not have specs, so I will use trial
and error), which has a small screen with a 600x800 resolution?

For the record, I tried a program called wkhtmltopdf (static version), and
it works, but sticks rectangles  between letters rather often. Printing
from Firefox to PDF works, but is a manual process. Considering I have
hundreds of files, it is impractical.

Thanks,

Z.

http://www.words2u.net - GPS points and tracks (mainly in Costa Rica)

http://www.words2u.net/recipes - Recipe collection
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20111029/bccd9fdf/attachment.html>


More information about the Linux-il mailing list