Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Saving a PDF with attached docs

$
0
0

Hi,

 

I used Lifecycle Designer to create three buttons ("Add File", "Open File" and "Remove File").

 

 

The Add File button has the following code:

var myDoc = event.target;

var sFile = "myFile";

myDoc.importDataObject ({cName: sFile});

var mydataObject = myDoc.getDataObject (sFile);

var sFileName = myDataObject.path;

ProgramCodeLB1.addItem(sFileName,sFile);

 

 

Next, the Open File button has the following code:

try{

var myDoc = event.target;

var sFile = ProgramCodeLB1.rawValue;

 

 

myDoc.exportDataObject({ cName: sFile, nLaunch: 2 });

}

catch(e)

{

app.alert("There are no files to open");

}

 

 

Finally, the Remove File button has the following code:

try{

var myDoc = event.target;

var sFile = ProgramCodeLB1.rawValue;

app.alert("You have just removed your Program Code file!");

myDoc.removeDataObject(sFile);

ListBox1.deleteItem(ProgramCodeLB1.selectedIndex);

 

 

I am wondering if anyone has been able to save a pdf after you have attached a file to it. The reason I ask is because when I save my file and close and reopen it again the files are no longer available for viewing....?

 

 

Any thoughts?

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>