Before you begin you need to have an account with our Doc Converter Pro Online Web App. If you have not done so please register for an account now. You can test the service for free but for production you will need to sign up for one of our paid plans.
https://api.docconverter.pro/api/converter/convertdoc - this API method will convert files sent via POST and will return or post back to a given URL the converted zip or html file.
The input parameters are:
https://api.docconverter.pro/token - this API method will return access token valid for 14 days, method requires 3 parameters:
We recommmend storing token in some cache or database and reuse it for each conversion call. Please check sample code apps below how to get and use token.
We have created a sample page that demonstrates how the API conversion works: Doc Converter Pro Web API Test Page
How to use the sample page:
Please check out WebAPITestApp.zip sample .NET Winforms C# app that does the same as PostConvertReturn.html sample page. Based on that sample app C# code you can write code for ASP .NET MVC web applications as well.
Please check out WebAPIPhpSample.zip sample PHP/HTML code that demos how to get API token and convert uploaded file. Extract zip to a php web server. Edit convert.php file and enter your Doc Converter Pro Online email and password on line 28. Set write permissions on upload/ folder if needed. Go to index.php in a browser, then select document to convert and click Start Converting button.
Please check out WebAPIJavaSample.zip sample Java code that demos how to get API token and convert uploaded file. Extract zip and edit WordCleanerWebApi.java file and enter your Doc Converter Pro Online email and password in GetAccessToken() method. Enter your doc file name and path and run.
Please check out WebAPIRubySample.zip sample Ruby code that demos how to get API token and convert sample doc file. Extract zip and edit dcp_web_api_sample.rb file and enter your Doc Converter Pro Online email and password on line 6 that gets api token. Make sure to install multipart-post gem: gem install multipart-post and then run this sample with: ruby dcp_web_api_sample.rb
Please check out WebAPIPythonSample.zip sample Pyton code that demos how to get API token and convert uploaded file to HTML5. Extract zip and edit docconverter_pro_api_sample.py file and enter your Doc Converter Pro Online email and password at 223 and 224 lines.
The Web API uses the same template files that you got on your Doc Converter Pro Online account; therefore, you can use the Doc Converter Pro Online version to prepare your template and preform any testing.
DCP Web API throttles requests per IP. You can convert maximum 2 documents per second, 40 documents per minute, 1000 per hour and 20000 per day. The best is to wait until conversion of given document is done then send another API conversion request. When converting lots of small documents we recommend to measure how many documents you convert per second/minute etc, otherwise you will get API quote exceeded error.
Questions? Contact us anytime.