Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting HTML to doc(x) and / or PDF [closed]

I have to convert html to the doc(x) and pdf format.

I found aspose, but this tool can do a lot of more work than i need, and thats why it isn't really cheap.

Are there similar tools, which can just do this conversion ?

I need this on a Desktopapplication where no word / office is installed

*Just for Info Finally bought asponse words. all other options weren't as good as this tool

like image 726
Boas Enkler Avatar asked Sep 11 '25 23:09

Boas Enkler


2 Answers

Assuming that these are essentially “documents” and not fancy graphical web pages (i.e. you'd like them to be legible, but aren't deeply concerned with the minutiæ of web layout formatting), you can use LibreOffice to convert them; either manually (open, export as…) or using the "headless" mode, e.g.:

soffice -headless -convert-to pdf -outdir pdfs/ *.html
soffice -headless -convert-to doc -outdir docs/ *.html

Free, cross-platform, but a bit of a hefty install. (I think it's nearing the half-gigabyte mark for the full suite with all the plug-ins installed, but you should only need the Writer component)

like image 198
BRPocock Avatar answered Sep 14 '25 13:09

BRPocock


Maybe this http://kitpdf.com might help. I tried it, it's free and really easy to use.

like image 28
Siar Avatar answered Sep 14 '25 15:09

Siar