I like finetuning my ebooks to make them look really nice, and since my e-reader has limited justification capabilities (that is, it's really bad at justifying text), I usually print my html books as PDF, with specific page size settings.
I've set up a specific PDF Creator printer with correct default settings (page size notably), and set up firefox to print with the correct margins. Since some books use LaTeX code in the html contents, I use jsMath to produce scalable math. Using a latex-to html converter is not an option, because pdflatex generates whitespaces which are not compatible with the way my e-readr detects words boundaries, and hence it disables most useful functions such as dictionary lookups and the like.
So my usual workflow is
- Open the HTML book in firefox
- Wait for jsMath to complete
- Print as PDF
Is there a way to script firefox so that I only have one command to launch. Ideally I'd type something like
firefox print-after-waiting-for-script-completion path-to-html-page