We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c01e500 commit 2e9bcbdCopy full SHA for 2e9bcbd
moumoubaimifan/convertHtml/convertHtml.py
@@ -0,0 +1,11 @@
1
+import pypandoc
2
+import pdfkit
3
+
4
+# web to pdf
5
+pdfkit.from_url(['www.baidu.com','www.bing.com'],'search.pdf')
6
7
+# html to pdf
8
+pdfkit.from_file('/Users/xx/Desktop/html/baidu.html', 'html2pdf.pdf')
9
10
+# html to word
11
+output = pypandoc.convert_file('/Users/xx/Desktop/html/baidu.html', 'docx', outputfile="baidu.doc")
0 commit comments