Image Field - Runtime href Setting issue

I am trying this simple code to set a href of an Image/ImageField object which is not working.
Image1.value.image.href = "http://www.adobe.com/ubi/globalnav/include/adobe-lq.png";
Am I missing something??
Nith

Hi Paul,
I tried this logic on exit event of a drop-down list.
My requirement is to have a dynamic table on which each column will have an employee drop-down & a photo (image field).
On choosing the employee name, the photo must appear on the image field. The form will then be saved and send to a manager for approval.
The photos of the employees are already saved in a file location.
Is this possible?
Thanks,
Nith

Similar Messages

  • How to check image GPS data and get image file from image field

    Hello,
    I have some trouble and want to fix this problem.
    1. I want to validate image file before its attached in image field about the image file have a GPS data or not. Have any way that can be check about image has contained a GPS data?
    2. After validate image and PDF form is upload to the server. I want to get image file that embed in image field, because I have to extract image from PDF form and store this image in project image folder. If this topic can be fix by code script please give me some example code.
    Thakyou for every comment and suggestion
    Best Regards,
    Mai

    Hi Naill,
    First I have to say thankyou for your answer.
    About my (1) question, My image fields have set to be a embedded data and I try to test many example script of image fields.I can get image content type, image size. But that not work when I used ImageField1.desc.embeddedHref.value. It's response as "Unknown Embedded URI". Therefore, image field is and embedded data. How can I access filename?
    (2) In that forum. As I see, his problem is about how to automate change image field with href image file. But I want to extract an exist embedded image in PDF form to normal image file with original metada (such as extract image filed to .JPEG with GPS data. Same as before attached in PDF form.). There has any concept or solution in this problem?
    Best Regards,
    Mai

  • Clearing an image field

    I have created an image field that a user can select via a checkbox.  The image field is hidden by default.  If the user clicks a checkbox the field becomes visible.  Clicking the field allows the user to embed an image. 
    I am attempting to set a "clear image" action, but for some reason if I set the image field rawValue to null the image field disappears and will not come back.  The only command I am associating to the button is:
    COPQImage.rawValue = null;
    This makes the field disappear as if it was reset to hidden, and clicking the check box to attach an image will not bring the field back.  Is this a bug, or is there something else that needs to happen to an image field if you set it's rawValue to null?

    Thanks Niall -
    I have found your exmaples to always be very enlightening and helpful.  In this case, there seems to be an issue when you set two properties:
    1.  You set the imagefiled to be hidden until a user requests it to be visible via a checkbox, button, etc, and hide it again it they opt to get rid of the imagefield (they change their mind)
    2.  You set the imagefield to expand to fit in the X and Y axis
    In my case users are attaching snapshots of graphs they need to support the text written in a textfield.  They may or may not require an image to accompany it, so I set the imagefiled to be hidden by default.  They check the "Attach image" checkbox, I setFocus to the imagefield, they select an image.  All good.  But if you set the imagefield rawValue to null to clear it, as you do in your example or with a button or a checkbox or any manner, and hide the imagefield again to clear it's layout space you cannot get the imagefield to come back.  I altered your code to hide 'myimage' with a checkbox, and set the layout to expland in X and Y.  Once the rawValue sets to null and myimage is hidden it will not come back.  If you do not set the layout proerty to expand it works fine.  But if you expand that imagefield to size accordingly rawValue = null kills the ability to have it come back once hidden.

  • Image Field Scale Proportionally does not work

    Dear all,
    we are using LiveCycle Designer ES 8.2 to program a dynamic form in which we want to use image fields. Users filling the form should choose the picture to display in the image field.
    We set the Image Field to embed data (so it can be saved) and to scale proportionally.
    Testing the form with Adobe Reader 8.1.4 or 9.1, it’s possible to insert a picture, but it does not get scaled and seems to be positioned in the Background of the form.
    Who can help us fixing this problem? If helpful, i can provide a copy of the form draft. Thanks in advance for any help und
    kindest regards
    Tobias

    Yehaaa,
    figured it out by myself. Sometimes it's good to sleep a night over it ...
    The solution is: In the Layout Tab of the image field, no exact measures were defined (extend to fit boxes checked). This way the poor program goes into a circuit.
    Cheerio
    Tobias

  • LiveCycle Designer 8.0 - Image Field Issue

    I am using LiveCycle Designer 8. Ive inserted an image field and when I test it, the image doesnt scale proportionally even though the properties are set up correctly (Scale image proportionally). I understand that in order to get this to work, the files needs to be saved as a dynamic PDF, but I don't have an option of saving as a dynamic PDF. The only "Save as" type options I have are Adobe 7 (Static) PDF Form and Adobe 8 (Static) PDF Form. I also don't have an option of saving as a "dynamic" PDF in the Acrobat Save As window.
    Is there a way to work around this or am I doing something wrong. The file was designed in InDesign, exported to a PDF and then brought into LiveCycle to insert text fields and an image field for a user to input their contact info and their logo. The 5 text fields work perfectly and the one image field works EXCEPT for scaling proportionally even though the properties for that field are set correctly.
    I appreciate any assistance. Thanks!

    Did you import the file using "Create an Interactive Form with Fixed Pages" as your selection on the Import dialog? If so, this brings in the original InDesign PDF as "artwork" (a background layer) on which your form fields are placed. This document can't be dynamic. That might be the issue.

  • Image Field - Scaling Issue

    Hi,
    I'm using Interactive Forms for priting sales orders. For each line item I display a small product image in an image field. For this image field I use the setting "Sizing - Scale Image Proportionally". If I use this form as a print form evrything works fine, the image is being scaled correctly. But if I use it as an interactive form (parameter /1BCDWB/DOCPARAMS-FILLABLE = 'X' ) the following occurs:
    The image is being resized to fit into the image field. It looks like using "Sizing - Scale Image to Fit Rectangle". The funny thing: If I use a default image for this field, it is being displayed correctly in the "Body Pages" tab, but not in the "PDF Preview". It's only being scaled proportionally if in the form properties the preview type is "Print Form" (or parameter /1BCDWB/DOCPARAMS-FILLABLE = ' ' ).
    In my eyes it looks like an ADS issue. But maybe somebody of you got an idea how I could fix that problem.
    Thanks & regards,
    Matthias

    hi,
            the process which u followed is correct but the thing is u hv forget to enable the check box called "embedded image"........ which will be present in the image properties.......... if u enable this check box then the image will be displayed in pdf preview.
                     I hope i solved the issue.
    Thnx,
    Vishnu

  • Image control runtime creation issue

    I am having problems getting the Image control to actually
    display the image I specify in the source property. The Image
    control is created in actionscript at runtime based on XML returned
    by an HTTPService request. I have a canvas that I want to populate
    with Label, Text, Image, LinkButton, etc. controls based on the
    contents of the XML file that is read in, so I have to create all
    the components on the fly and use something like this:
    var newImage:Image = new Image();
    newImage.setStyle("source", "images/myImageFile.jpg");
    myCanvas.addChild(newImage);
    After I get all the newly created components added as
    children to the canvas I go back through and do positioning
    (something like this):
    for each (var child:DisplayObject in myCanvas.getChildren())
    //set the y property of each component to the y of the
    previous child plus
    //the height of the previous child plus 10 px margin
    Wherever there is an image in my XML it inserts the 10px
    margin for that component, so I know it's creating it and that it
    gets added as a child, but for some reason the image is not
    displaying and so the height of the component is 0. I even tried
    hardcoding the height of each Image control in case the image was
    there but it just wasn't sizing right, but it puts in the space
    without displaying the image.
    What I'm wondering is if there is some method that will force
    the Image controls to either load the image or render it. When I
    add an Image in mxml and use the exact same source data it displays
    just fine, so the file path is correct. I also have the same images
    being read in from XML off the HTTPService that are showing up just
    fine in a TileList where my itemRenderer component has an image
    with the source set to the same path as I'm trying to use in the
    runtime-generated Image controls.
    Also, as a side question, does anyone know why a lot of the
    properties/methods available from mxml specified comonents aren't
    available when you create variables of the same type in
    actionscript? For example, if I have
    <mx:Image id"img"/>
    I can go back in actionscript and reference img.source just
    fine. On the other hand, if I declare an Image in actionscript,
    thus:
    private var asImg:Image = new Image();
    and then try to refer to the source property like so:
    asImg.source
    it doesn't show up in the code hinting and it also throws an
    error on compile (reference to a possibly undefined property source
    for bla bla bla)
    Actually, I've noticed that a lot of the properties and
    methods of various components aren't available when they are
    actionscript rather than mxml. I didn't see much in the
    documentation on the difference or what could be done to work
    around it.
    Thanks much anyone who has input.

    Ok, got it.
    I figured that since the <mx:Image> renders just fine
    and that the ActionScript Image object doesn't that I'd just create
    a custom mxml component with Image as the base element and with
    nothing else in it. Then I add an instance of my custom image
    component in AS whenever the XML specifies one. The layout was a
    bit of an issue, but I just added the image dimensions as
    attributes in my XML and size the CustomImage component based on
    those.
    Must be some subtle difference between the mxml and AS Image
    classes that isn't documented very well.

  • Setting source for image field

    I'm still trying to find a way around my "watermark" issues. It doesn't have to be a watermark, per se. I just need to be able to put the picture on the form based on user submission. Here's what I've done, but it's not working as I expected. Perhaps someone can help?
    The livecycle form has an image object. It also has a dropdown selection. Depending on what the user selects in the dropdown, I change the href of the image. Although the field accepts my input, it doesn't actually SHOW the image that I put referenced.
    Another important point I've left out of my previous posts....
    There is a great deal said about how it is easy to confuse changing the appearance of the document without changing the layout. Actually, this is exactly what I want to do. When I am totally done with everything, I intend to flatten the whole thing and save it as an unchangeable document. (This may require printing to a PDF print driver.) In other words, my application is not about the DATA in the form, but the LOOK of the form when it's filled out.
    So, the question of the day is....
    Given an image field, how do I programatically change the actual image it displays?

    I believe this is one of the security restrictions in Acrobat. You can't redirect to an external source programatically. If you want the user to be able to switch pictures based on a listbox selection, you must embed each picture in the document. There is a sample that covers this technique on http://www.adobe.com/devnet/livecycle/designer_scripting_samples.html
    the link is titled: "Display different images inside the same image field"
    If you want to display an image that is not embedded, you are basically stuck with the "click-and-browse" functionality that is the default behaviour of an image field.

  • Images appear fine in Photoshop cs6 and cc, but print too dark, and also show too dark in Windows picture viewer. How can I correct this? Is this a Photoshop setting issue or what?

    Images appear fine in Photoshop cs6 and cc, but print too dark, and also show too dark in Windows picture viewer. How can I correct this? Is this a Photoshop setting issue or what?

    Ok, look at your files in Photoshop. What is the profile assigned to them? You can find this out by going to the Status bar at the bottom, clicking on the right-pointing triangle and choosing document Profile from the list.
    Then in Windows, go to your Control Panel > Color Management and add sRGB (if it isn't there) and select it as your default profile.
    I hope that will work.

  • Setting Image field in adobe form

    Hello Gurus,
    I have a question setting the image field dynamically.
    I have created a following context structure for
    DataSource(ValueNode Cardinality (1..1))->imagenode(Valuenode Cardinalty(0..n))->image(Value attribute))
    I have binded the Datasource node to the Datasource of the interactive form.
    I have dynmaically created the imagenode and set the value for the image.
      for(int i=1;i<5;i++)
             image= wdContext.createIImagenodeElement();
                              if(i==1)
                             image.setImage("http://Image1.png");
              if(i==2)
              image.setImage("http://Image2.png");
              if(i==3)
              image.setImage("http://Image3.png");
              if(i==4)
              image.setImage("http://Image4.png");
              wdContext.nodeImagenode().addElement(image);
    Now I want to set this node to the image field in adobe.
    In URL of the image field I have enterted $record.imagenode[*].image and its not working where as the same thing works for text field.
    Please let me know if any one has any idea on this.
    Thanks,

    Hi Naresh,
    Copy the images to src -> mimes - > Components of your development component / project.
    To the value node set the url like the following way ...
    http://<hostname>:<port number>/webdynpro/resources/image.gif
    Thanks
    Madhu

  • Image field issues in Adobe LiveCycle Designer

    Hello All,
    When I create an image field in Adobe Designer (I'm creating some interactive forms), the field does not end up being the exact size I specify. It is very important to me that the end size be precise, but Designer seems to allow some border instead of filling the extents I have specified. In other words, the image someone inserts into the image field ends up being a little smaller than it should be. This is very frustrating, and I have to try to compensate for this glitch by specifying image field dimensions that are larger than what I want. (This is not a problem of my not specifying scale to fit, or stretch to fit; when I do this, the image is still too small.)
    Another question I have is this: Why doesn't Adobe allow vector graphics to be imported into Designer? I am forced to convert my vector graphics to raster images to bring them into Adobe Designer. Designer doesn't even accept a PDF image, which I find ironic.
    This is a super super urgent project work I am doing..
    Please help..
    Dimitri

    Better too late than never!
    Here's an answer that I got today about this "bug":
    "It seesm to be related to the setting "Use Original Size". If it is initially set at that setting the picture gets messed up and cannot recover. If I use Fit to Rectangle it seems OK ...then I can change it at will."
    Weird.

  • Search & Replace objects (image to image field) within LCD?

    Hi everybody,
    I was wondering if there is a possibility to create a script which supports an automated sequence.
    I planned to run through an imported PDF file while searching for "images"-type objects with a certain "tag". When such an object is found, it should be replaced by an "image field" type object.
    Is it possible to implement this type of function?
    Thanks!
    Best regards,
    andrejtmtld

    I believe you can't do exactly what you mean.
    These days, I am working a lot with Acrobat which has many script features in common with LiveCycle. Now, in Acrobat, you meet a lot of security issues when trying to add/remove fields at runtime. I believe Adobe people must have adopted the same approach for LiveCycle because most of the work done with it, will be converted to a pdf, i.e. mainly Acrobat or Reader objects.
    This is where I got to:
    var nodeList = xfa.form.form1.mainSub.nodes;
    for (var i = 0; i < nodeList.length; i++){
         if (nodeList.item(i).className == "draw"){
             var fType = nodeList.item(i).ui.oneOfChild.className;
             if (fType == "imageEdit"){
                 xfa.host.messageBox("First Check: "+ nodeList.item(i).name);
                 var myField = nodeList.item(i);
                 var url = myField.resolveNode("value.#image").href;
                 xfa.host.messageBox("Second Check: "+url);
    See these:
    http://andrewalbrecht.com/content.php?pageID=76
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/
    (Scripting --> Scripting Reference --> Scripting Objects --> Image)
    As you can see, I can capture a static image. I'll find all of them. I think you can go further and select the ones you identified by a tag. Actually, what do you mean with "tag"? A tooltip?
    Anyway, I believe you can get to the URLs the images you are interested in are pointing to. Now, if you were able to delete a static image and add a corresponding image field, you could assign the retrieved URLs to these freshly created fields.
    At this point I found these:
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/
    (Scripting --> Scripting Reference --> Scripting Methods --> createNode; watch out the note and consider that a static image is a draw; however, in this case, you need to create an image field)
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/
    (Scripting --> Scripting Reference --> Scripting Methods --> remove)
    and this:
    http://forums.adobe.com/thread/694384
    However, it seems that though dataNodes can be created and deleted, I don't come to any changes of the form itself. I tried with
    xfa.form.remerge();
    or
    xfa.form.recalculate(1);
    and similarly with xfa.form.model object with no success.
    I don't know whether I am doing something wrong here.
    Anyway, I see only two alternatives:
    1) hide and show fields: I think this is not of your interest because you are not creating the form from scratch (here you should prepare the form in advance with as many image fields as static images you intend to use and switch between those 2 kinds of object);
    2) hide one static image and add a corresponding new instance of an hidden subform which contains just an image field you provide the right URL to. I think the instanceManager can work with subforms only:
    http://help.adobe.com/en_US/livecycle/10.0/DesignerScriptingRef/WS92d06802c76abadb-3e14850 712a151d270d-7fa1.html
    Following one the many tutorials around:
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000847.html
    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000177.html
    http://help.adobe.com/en_US/livecycle/10.0/DesignerScriptingRef/WS92d06802c76abadb-3e14850 712a151d270d-7ffa.html
    you can reach the same effect as the static images were removed and image fields were created.

  • Problems with Image Field Table in Adobe Forms

    Hello,
    I have a desgined a Adobe Form(Print Only) in the Adobe Desinger in NWDS.
    The form layout contains a table of images in 2 columns and 3 rows. Every Column has a Image Field and a TextField displaying the Image URL.
    The URL of this image is passed at runtime.
    The problem is that when the form is rendered, All the Columns have the same image which is the URL in the first row first column. However the text field displays the correct URL.
    Is this some known bug in the Adobe Forms, or I am missing some property.
    Regards,
    Shubham

    Hi,
    The solution was to put the following code in the initialize event of the image field.
    this.value.image.href = <Photoimagepath>.rawValue;
    Where <Photoimagepath> is the image path.
    Regards,
    Shubham

  • Dropdown list to change image field linked image?

    Hello,
    I am quite new in Designer but I have to complete a job and I don't find the solution.
    I try to update on a form an image field using the value of a dropdown box and a "if" script.
    I use linked images (not embedded ones) and try using a script calling the image Field. value. image. href  property.
    The property is well updated as export to xml displays well the new href value but the image is not displayed as something was missing to activate it.
    form1.#subform[0].ImageField1::calculate - (FormCalc, client)
    if (UN_DropDownList == "3373") then ImageField1.value.image.href = ".\Images\UN3373.png"
    endif
    Rather simple (don't laugh at it) but it doesn't work.
    I found solutions for embedded images via visible/hidden by dropdown list (not yet tested) as these ones. I give them below for reference (if some other users are interested)
    http://forums.adobe.com/thread/683215
    http://forums.adobe.com/message/2187604
    http://acrobat.timhuff.net/?p=5
    But not for linked images (path or URL). By the way, I found same problem descriptions in other forums but without any proposed solution.
    As I should have quite a lot of images with frequent updates, it seems to me a better solutions...
    Thanks in advance for you help.
    Kind regards
    Philippe

    Hi Philippe,
    Have a look at this blog, http://blogs.adobe.com/formfeed/2009/11/linked_vs_embedded_template_im.html, it turns out that both linked and embedded images are stored in the PDF but just in different ways. So updating the href at run time will have no effect.
    If you are not in a possition to store all the images in the PDF at design time then you might have to look at setting up a webservice to access them on a server.
    Good luck
    Bruce

  • Image Field Not Displaying Images Properly

    I am using LiveCycle Designer 7.0 for the sole purpose of having the ability to insert an image field on my documents. I have set up the image field so that an inserted image is scaled-to-fit and right-aligned. When I insert an image, it does insert scaled-to-fit; however, it is always centered. When my coworker inserts an image it is stretched-to-fit and centered. I have double- and triple-checked that I have formatted the image field correctly. It isn't working as programmed. Is this a bug with LiveCycle Designer or is there a way to fix the problem?

    Hi guys,
    I'm also having this issue with Image Fields in Reader 8 - they skew no matter what setting you choose to display them as. 
    Anyone know of a workaround (maybe a javascript to force image proportionality?)?  Image Fields are not very helpful if you require all of your users to download Reader 9...
    Also, I'm aware that Image Fields work properly as long as you do NOT import a pdf as background artwork.  So it could potentially work if you save your background pdf as an image and add it into a new Designer file as an image.  But this causes loss of picture resolution...
    Appreciate any help!

Maybe you are looking for