|
|
| Author |
Message |
Cryotech
 Total Messages 2
|
| Subject: | I know this can be done but I'm pulling my hair out trying to figure it out |
Hello all,
What I'm trying to do is allow my users to be able to import / upload their own images into the interactive form but for the life of me cannot figure out / remember how to do this.
I've tried writing and using all sorts of JavaScript code and I'm at the end of my rope.
Would someone please be kind enough to lend me a hand and show me how this is done?
All help would be extremely grateful and my head would thank you too lol.
Cryo
| Posted: 29 Apr 2011 03:14 AM |
|
|
| |
gkaiseril
 Total Messages 3000
|
| Subject: | I know this can be done but I'm pulling my hair out trying to figure it out |
It can only be done if the form is crated using LiveCycle Designer (XML form). Forms created in Acrobat using the AcroForm tool bar can not provide this service.
George Kaiser
| Posted: 29 Apr 2011 08:13 AM |
|
|
| |
Cryotech
 Total Messages 2
|
| Subject: | I know this can be done but I'm pulling my hair out trying to figure it out |
Hello,
Not sure what the acroform tool bar is, so I'm guessing I didn't use that.
Actually, I use two different types of PDF creators that allow for Push Button Icon change so that shouldn't be an issue.
I know it can be done because I've seen it done. In fact, I have code that works to a point then Acrobat rejects it when before it never has.
Does anyone know of any javascript code that works in regards to changing an icon based on user image upload?
Thanks for the time and help.
| Posted: 02 May 2011 02:13 PM |
|
|
| |
gkaiseril
 Total Messages 3000
|
| Subject: | I know this can be done but I'm pulling my hair out trying to figure it out |
LiveCycle Designer has the ability to perform this task.
If you wan to use Acrobat, then you need to create a PDF of the image and import that to a button:
var f = this.getField("myPicture");
f.buttonSetCaption(row.FirstName.value + " " + row.LastName.value);
if (f.buttonImportIcon(row.Picture.value) != 0)
f.buttonImportIcon("/F/employee/pdfs/NoPicture.pdf");
Or process an Icon Stream:
Import an icon into the document-level named icons tree and add a toolbutton to the application.
this.importIcon("myIcon", "/C/temp/myIcon.jpg", 0);
var oIcon = util.iconStreamFromIcon(this.getIcon("myIcon"));
app.addToolButton({
cName: "myButton",
oIcon: oIcon,
cExec: "console.println('My Button!');",
cTooltext: "My button!",
nPos: 0
});
George Kaiser
| Posted: 03 May 2011 09:24 AM |
|
|
| |
|
|