Examples of how to use DocTo
It is very simple to convert a Word Document to a XPS file on the command line using Docto. You can also do this easily in Microsoft Word, but sometimes it helps to be able to do it from the command line. And its really simple to fire a webhook that you can recieve at any website. Just use the -W
parameter.
The command line below shows how you can convert a Microsoft Word Document to a Microsoft XPS Format file - XPS and fire a webhook.
docto -WD -f 'c:\path\Document.doc' -o 'c:\path\Document.XPS' -t wdFormatXPS -W 'https://example.com/mywebhook.php'
or easier to read
docto -WD -f 'c:\path\Document.doc'
-o 'c:\path\Document.XPS'
-t wdFormatXPS
-W 'https://example.com/mywebhook.php'
-WD
- This is a conversion using Microsoft Word. This is not required but makes it easier to read-f
- The File or directory to be converted-o
- The Output File or Directory where you would like the converted file to be written to.-T
- The file format type that is being converted to-W
- Fire a webhook to the provided URL. See Below for more detailsThe Webhook URL will be called on the following events with the following parameters
File Conversion
Error
Return value is ignored, no errors are logged. This is a fire and forget Webhook.
The URL will look like this
https://example.com/webhooks/docto/webhook_test.php?action=convert&type=wdFormatPDF&outputfilename=D:%5CDevelopment%5CGitHub%5CDocTo%5Ctest%5CGeneratedFiles%5Cpie3.pdf&inputfilename=D:%5CDevelopment%5CGitHub%5CDocTo%5Ctest%5CInputfiles%5Cpie3.doc
You might find some of the following commands also interesting.
DocTo source on Github| Index of Examples | Download Latest Release