There are no forum posts on this topic! Why don't you write one?
Hi,
I am using the JavaScript code to export html into the Docx.
is there any way that i can manipulate the response before downloading or i could get the file in response so i could manipulate it as per my need then download.
GrabzIt("Application Key").ConvertHTML(data ,{"onfinish": function(response){
alert(response);
},
"format": "docx"}).Create();
As here is a onfinish event but here i get only id not any response file response
if we have something like this will be helped.
You can get the response by using the DataURI method, which returns the response in a base64 encoded format.
However as the DOCX format is essentaially a ZIP file made up of a number of XML files covering things like content, styles etc. You may be better off using a server side language if you want to try and manipulate it.
Hi ,
After using the DataUri callback method i got the below response, but is there any way to convert it into the file format so i could download it after manipulation
data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,
UEsDBBQAAAAIABlr2U5ryYMnqhgAAPTYAAARABwAd29yZC9kb2N1bWVudC54bWwgohgA
Thanks
Remember you are trying to do this in JavaScript so this severley limits what you can do if you are not willing to use a server-side programming language.
You have two options:
The first option is to put the Data URI in a HTML link and add a download attribute. When someone clicks on the link it will download.
Otherwise you can upload this Data URI to a server-side programming language. Manipulate it there then re-download it from by calling a creating a new web service for the purpose and calling it from the client side.