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

只谈情不闲聊 提交于 2019-12-06 11:31:54

问题


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


回答1:


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)




回答2:


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




回答3:


You can use ABCPdf:

http://www.websupergoo.com/products.htm




回答4:


I can't speak for docx format, but you might look into DocRaptor to convert HTML to PDF format. It definitely handles CSS styling better than comparable programs, and doesn't just give you an image like creating a PDF with Photoshop.




回答5:


If the webpage is or can be hosted then you can download an extension for Google Chrome called Screen Capture, this allows you to take a full screen grab of the webpage then you can paste it into Photoshop and Save As a .pdf (that is assuming you have Photoshop that is)



来源:https://stackoverflow.com/questions/8404019/converting-html-to-docx-and-or-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!