Hi! the main motive behind building this api is to convert any document into pdf and make it available for free to all and currently it is development phase and have more bugs than feature but i will try to make it better and working.
Live demo: https://doc2pdf-api.herokuapp.com/
"html-pdf-node": "^1.0.7"
"mammoth": "^1.4.17"
Doc >> HTML by using Mammoth >> PDF by using Html-pdf-node library
https://github.com/shivamkapasia0/Doc2PDF_API.git
npm install
npm start
GET /
http://localhost:5000
https://doc2pdf-api.herokuapp.com
GET /service/
curl -i -H 'Accept: application/json' http://localhost:5000/service/
curl -i -H 'Accept: application/json' https://doc2pdf-api.herokuapp.com/service
GET /service/convert/
http://localhost:5000/service/convert
https://doc2pdf-api.herokuapp.com/service/convert
{
"mimeType": ".doc",
"base64":"your base64 here.."
}
{
"status" : "Success",
"base64" : "Converted PDF base64 will be here"
}
var data = JSON.stringify({
"mimeType": ".doc",
"base64": "Docxbase64here"
});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://doc2pdf-api.herokuapp.com/service/convert");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
Currently it is in development phase as it doesn't have many features as well as error handling of data to be improved and it has more bugs than features😂😂. so your contribution will be appreciated🙏.
MIT
Free Software, Hell Yeah!