The script
Please open ".bashrc" file with your favorite text editor, and add the following code at the end of the file:
Save the change you've made. To convert Microsoft Word document, simply open a new Terminal window and type the following command:
- doc2pdf () {
- curl -# -F inputDocument=@"$1" http://www.doc2pdf.net/convert/document.pdf > "${1%.*}.pdf"
- }
Or if you want to convert Microsoft Office 2007 or later document, run the following command:
- doc2pdf file_name.doc
Wait, what just happened? Simple, it sends Microsoft Word document to www.doc2pdf.net and download the converted PDF file automatically!
- doc2pdf file_name.docx
Demo video:
Regards :)
0 comments:
Post a Comment