email - Send PDF as attachment via JavaScript -


i have pdf in acrobat following javascript in button's mouse down method. code prompts mail client (in case, outlook or webmail). when select outlook, new outlook message formed appropriate to:, subject:, , body: areas file button resides not attached. documentation https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address seems indicate file attached automatically. i'd code pdf attached. e message not return text.

try {     var mydoc = event.target;     var ctoaddr = "rrose@bi.com";     var csubline = "test email";     var cbody = "email body text";     this.maildoc({bui:false, cto:ctoaddr, ccc:"", csubject:csubline, cmsg:cbody}); } catch(e){app.alert(e)} 

a few comments:

1) when want when user clicks button, use mouseup event (and not mousedown); clicking releasing mouse, not pressing it.

2) event.target button field, , not document. document this.

3) highly recommend download acrobat sdk adobe website. there find documentation acrobat javascript; have @ it, in particular @ description of maildoc(), , security restrictions.

4) see 3) …


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -