mercredi 20 juin 2018

Any replacement function for ActiveXobject in Chrome?

Hey I have question related transfer some of the old .hta application to chrome. Are there any replacement function in Chrome, I can parse a pdf file from the pdf file links: my old java-scripts was:

    var PDFDoc = new ActiveXObject("AcroExch.AVDoc");
    if (PDFDoc.Open(filePath, "")) {
        //PDFDoc.BringToFront;
        //PDFApp.Show();
    }
    else { 
        alert("Invalid file path for opening a PDF");
        return false;
    }
    var PDDoc = PDFDoc.GetPDDoc();
    var jso = PDDoc.GetJSObject();
    var extractor = function (fieldName) { 
        if (jso.getField(fieldName) != null) {return jso.getField(fieldName).Value;} else {return "";}
    };
    return extractor;




Aucun commentaire:

Enregistrer un commentaire