Can someone please help me on this
I would like to create / open a file from which is Binary…
The file we would be receiving is binary so How can i create the file and display on the canvas of HTML5 for pdf in aspose
function defaultSelecting(file) {
var filenm = ‘219603092’//getParameterByName(‘id’);
alert(“file in defaultselecting: " + file);
/* var first = getUrlVars()[“host”];
var second = getUrlVars()[“user”];
first = document.getElementById(“myLabel”).htmlFor;
alert(first);
alert(second); */
// alert(getParameterByName(‘host’));
var url, tesxtval;
// var fp = “…/Convert/pdf-sample2.pdf”;
var fp = new FormData();
url = fp;
var xhr = new XMLHttpRequest(), blob;
var str = document.getElementsByName(‘Hiddenfilename’).item =filenm ;
//alert(fp);
//alert(str);
//alert(“path:”+ str);
$.ajax({
type: ‘POST’,
url: ‘CanvasSave.aspx/defaultPdfFunction’,
data: ‘{ “fileName” : "’ + str + '”}’,
contentType: ‘application/json; charset=utf-8’,
dataType: ‘json’,
success: function (response) {
var data = JSON.stringify(response.d);
data = (data.replace(/[’"]+/g, ‘’));
dataLoad = data;
// alert("Data load " + data);
First();
},
error: function (xhr, tesxtval, error) {
$(’#loadingModal’).modal(‘hide’);
}
});
}