2 Replies Latest reply on Jun 16, 2015 3:00 AM by Test Screen Name

    Remove image object by ID reference on print with Acrobat javascript API?

    daniell13422037

      I'm trying to programatically remove an identifiable image when the user tries to print the document. I'm new to Adobe's js API (and the guide is massive) so I'm not sure how to reference objects or add event listeners. In the browser the code might look like:

       

      (function(img) {
      var document = app.newDoc();
      var img = document.getElementById(img);
      document.addEventListener("print", function(e) {
        img.parentNode.removeChild(img);
        });
      })("myImageID")
      
      
      

       

      I went through the API reference's table of contents, but couldn't easily find methods concerning how to remove objects from adobe dom (if there even is a dom like there is in the browser). Any tips?