I have HTML files that are created automatically, I also want to save them as PDF files. One way to it is to open them in firefox and print them to file as a pdf file. But I can't do this by hand each time, I need this to be scripted.
Is there a way to script firefox in linux to:
Open a HTML file.
Remove all the "extra data" from the print page layout (time, URL, page# and any other data that may be added to a printed page by default)
Print the file with a specified name (The same name as the html file, only as a .pdf)
close Firefox
And all this in batch mode, or by redirecting DISPLAY to NULL.
Other programs that convert html to pdf, won't work unless they are native to linux. (Come with most distributions).