Browse button in Adobe Livecycle designer ES 8.2

Avatar

Avatar
Level 1
arunpriyan89483
Level 1

Likes

0 likes

Total Posts

10 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
arunpriyan89483
Level 1

Likes

0 likes

Total Posts

10 posts

Correct reply

0 solutions
View profile
arunpriyan89483
Level 1

04-12-2017

Hi All,

LiveCycle Designer

I'm trying  to add attachment in PDF from using Adobe Livecycle ES 8.2 designer tool.Used the custom script in button click, but it's not working. Please someone quickly advise me and share the custom script to add attachment in button click event.

Script is

  var annot = this.addAnnot({

        page: 0,

        type: "FileAttachment",

        point: [500, 500],

        noView: true,

      author: "Attachment"

    });

    annot.cAttachmentPath;

    var attachmentObj = annot.attachment;

    if (attachmentObj !== null) {

        app.alert("Add this file: " + attachmentObj.name);

        var l = this.getField("lst1");

        l.insertItemAt(attachmentObj.name, 0);

    }

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

04-12-2017

This is a script for use in Adobe Acrobat not LiveCycle Designer. There is difference in the JavaScript API between those applications, so it won't work in a form you creating with Designer. Btw. Designer is only the tool to design forms, not to use them. The forms will be opened in Adobe Acrobat or Adobe Acrobat Reader at the end. You'll only be allowed to add attachments by scriptings in Acrobat but not in Reader, because as its name already says, it's for reading. So if the destinated user will only have Reader, forget about it.

Well, there is little a chance to have this function for Reader too by using the so called LiveCycle Reader Extensions. This is a module for a LiveCycle server (not the Designer you have!) that can add additional right to PDF form to enable functions in Reader that normally only Acrobat has. But, yes there is a but. It's very, very, very expensive, so you propably don't have it.