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.

Similar Messages

  • Is there a way to replace an image file within a PSD in photoshop elements 13?

    I've got 12 separate PSD files, with one image consistently in every document, but resized differently and very specifically for each of the documents. I've made some changes to the jpeg image separately, but instead of dropping the new image into each individual PSD and having to arduously match it to the previous version of the image, does anybody know if there a way to just ask elements to replace it by directing it to the new version of the jpeg?
    In each PSD, the image is by itself on a layer of its own, nice and simple.
    Any help would be greatly appreciated.. it seems like a simple thing to do, I just cant find how!
    Thanks!

    Offhand I doubt this can be done in PSE, at least in my dinosaur version 2. Maybe someone else knows if this can be done in 13.  Sorry
    But perhaps you can use the following trick.
    Here I selected the sunflower, did a copy/paste to create a new layer, and moved the new area out of alignment.
    Change the blending mode of the mis-aligned layer to "Difference".
    Use the arrow keys to nudge the layer so that the result is totally black.
    Change the blend mode back to "Normal" and, voila!, the layers are perfectly aligned.

  • Is it possible to have an image field?

    Is there a way to create an "image" field within a form, essentially enabling the user to enter images the same way they would text?

    Read this:
    http://answers.acrobatusers.com/insert-image-form-field-Is-Acrobat-ProX-q2906.aspx

  • Replace words with images, in a table, using the search/replace tool

    Hello everybody
    I have a question:
    Is it possible to replace words with images, in a table, using the search/replace tool?
    My case:
    I have a table with about 9000 articles on about 400 pages. In this table there are words which I like to replace with Logos.
    Example: The word "DM" should be the Logo "DM" (.eps). This word is about 1200 times in this table.
    Is it possible to replace it automatically?
    Thank you very much for your helb.
    Kind regards Alex

    Hello Mr. Werner
    Thank you for your reply.
    Can I ask you which Version of InDesign do you use?
    I use CS 5.5 and there I can't find the change field "other" you told me.
    Can you see it on the screenshot? (Sorry it is german...)
    Thank you very much for your support.
    Kind regards Alex

  • How to bind "Image Field" object on a database

    Hi to all
    I inserted into a dynamic PDF (Livecycle ES3 trial) an image field, but I don't understand how I can to bind a JPG into a database.
    In (F5) preview... I'm able to open a image file on filesystem and visualize it on PDF form... but then? How to bind on database?
    In my several tentatives I'm using a MS Access 2010 database table, where I defined a OLE object... but doesn't work.
    Thank you at all.
    visert

    Hi,
    I have not tried to do this, but this document provides some instructions.
    http://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdfhttp://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdf
    Hope it helps
    Bruce

  • From an image field to an image object...?

    Hello everyone,
    Since the image field will always be in the front I have a problem. I want the user to choose an image. This image should be in the background but after having chosen the image it appears in the front covering every other object.
    So what I'm thinking about is creating an image object for the background and a small image field where the users choses his image. The chosen image should then appear in the image object in the background.
    I tried it with javascript but it didn't work. I had success with textfields trying something similar, but now I have no clue about it.
    Does anybody know how to realize this?
    Thanks, Knud

    Hi Stefan,<br /><br />Thanks for responding to my last mail. I am talking about the XFA(xml form architecture). Actuallly i am working on Picture form field in PDF which Adobe has newly introduced. In this type of form field , user can add an image. But i am not able to differentiate between the "Picture form field" and "push button". The only thing i have found that the picture form field entry exist in dataset but not the Push button.<br /><br />29 0 obj<br /><<<br />/Length 13533<br />>><br />stream<br /><xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><xfa:data><form1><IMAGE href="" xfa:contentType="image/jpg"></IMAGE></form1></xfa:data></xfa:datasets><br />endstream<br />endobj<br /><br />In the above case the "Image" is a picture form field.<br /><br />Another difference i found between "push Button" and "Picture Form Field" is the MK dictionary as below.<br /><br />Pushbutton<br />-----------<br />/MK <<<br />/BG [ 0.831375 0.815689 0.784317 ]<br />/CA (Print Form)<br />/BC [ 0 0 0 ]<br />>><br /><br />Picture form Field<br />-------------------<br />/MK <<<br />/TP 1<br />/I 17 0 R<br />>><br /><br />But i want to find the exact difference. May be some bit in Form Field Flag(ff) signify the picture form field. It will be very helpful to me if you could tell me the exact difference.<br /><br />Kind Regards,<br />Shekhar Kumar Keshri

  • Is there a quick & easy way to replace an image within an image frame?

    Is there a quick and easy way to replace an image in an image frame that is already set up with the proper effects?
    In my example, I have a photo grid and just need to replace the photos periodically. Everything is already in place in the grid. I don't want to recreate the grid on the page.
    I thought that I could have clicked to get the brown frame for the image and placed a new one, but that didn't work. Or, I could have right clicked and found something like "replace image", but that didn't work.
    How can I quickly and easily just click on the image I need to replace and replace it with another one?

    There is an easy way to do this. Click on the image you would like to change and then change the fill to the new image. You will see the fill option in the upper left when you have the image you would like to change selected.

  • Manipulation of the size of an image inserted into an Image Field

    Hi,
    I'm learning LiveCycle Designer ES 8.2 as I go. My apologies for the lengthy post but I'm trying to give you as much background as possible.
    I'm are trying to design a form that will allow us to automate data entry (by importing fields into our Access dbase instead doing the data entry by hand).  However, at the end of the day, I also need an electronic pdf file of the same form and a printed paper copy.  Things have been going well until working with the Image Field.
    The form is fairly complicated - 4 pages long.  We're collecting extensive data on specific locales (location, what was seen there, who did the work, etc). On one page, three different images (maps) are needed, each one showing different details on the site's location.  [Please note these images will not be imported into the database but must appear in the electronic pdf and on the paper copy.] The people who fill out the forms are expected to do so using Adobe Reader (the form will have extended rights so that they can save the data they enter on the form).  They would then email us the form as an xml file.  Once we receive the form, we have to add some additional information and then the finalized paper copy and electronic pdf would be made.  We have already done this successfully with much simpler forms, none of which have needed Image fields.
    Here's my problem - one of the three maps required is a standard 1:50000 scale topographic map which shows things like contour lines and latitude/longitude lines.   For accuracy and comparison reasons, having the standard 1:50000 scale is very important to us, so we can make absolutely certain the submitter has the right location.  If the dot plotted on the map is out just a few millimeters, we're looking at an error that represents 100s of meters on the ground.
    The current form exists in Word - we have never had any rules about the image formats used (jpg, gif, etc) or the resolution, as long as the image was clear.  The only rule was that the scale of the topographical map image HAD to be at 1:50000 scale.  This gets very tricky because Word will automatically mess with the physical appearance of the image, based on its resolution.  In most cases, the submitter simply readjusted the image within Word, stretching/resizing it manually until the scale was correct.  Another option was to use an image in the emf file format so that Word didn't readjust the image's appearance based on its resolution. Whatever method they used was fine by us, as long as the scale was correct.
    So far, after playing with all the "sizing" options of the Image field, along with embedding or not embedding the file, I do not see any way to control the physical size of the image. On our form, the three image fields are different sizes, with 2 of them being small (~2x3 inches) and the 3rd being large (~7x7 inches). Regardless of the settings I chose for each image field, the program simply resizes the topographic map whatever Image field it was inserted into,  making the same image appear physically smaller or larger at will.  I cannot correct the scale by resizing it, like I can in Word.   Instead, when I try to select the image, all I am asked is if I wish to insert another image.  Inserting an .emf file format into the field doesn't work - it only shows a blank screen instead of the image.
    Is there a way for the user to adjust the image's physical size in the form, after inserting it (like they can do in Word)?  Demanding that everyone use a standardized resolution or image format also seems highly unlikely to work - there are too many submitters and too many programs that can be used to make the image (some are making them using GIS programs, others are scanning the bought topographic print).  I'd appreciate any help you can give me on this.  I have had very little luck tracking down discussions on Image fields and how they work best within LiveCycle.  Any comments would be helpful!

    Hi,
    I have an example here that is intended to demonstrate the difference between Positioned and Flowed subforms: http://assure.ly/i8pSdy.
    This shows how you can use a slider to change the dimensions of the image object.
    I have extended this to an example with buttons to scale the image: http://assure.ly/i8ZI5Y
    This may not be fine enough for your purposes, but it may give you some ideas.
    Good luck,
    Niall
    Assure Dynamics

  • Images and image field problem

    Hi
    I would like the user to be able to upload an image that will be scaled proportionally to the size of the field pre determined.
    I understand that options of image field: "scale image proportionally" is meant for this exactly.
    For some reason, this works with images but not with image fields.
    please see a printscreen I have made of the problem: same field size and same image uploaded
    thanks

    In Lightroom, there is no specific location where the photos should go. You can put them wherever you want, based upon your storage needs and hard drive setup.
    So, with regards to your specific question, yes you can put the photos in the same folder as where the .lrcat is located, I can't see any harm, but I also don't think you need to do the work to make that happen. You can pretty much leave your photos where they are (which is easier and less time consuming) than moving them to the .lrcat folder, and easier and less time consuming than moving them at all.
    In fact, I strongly suggest you change your thought processes from "Where do I put my photos" to "How can I organize my photos". Now that you are a Lightroom user, you organize your photos from within Lightroom, not by moving them here to there, but by adding keywords and other metadata. Organizing, now that you are LR user, is not folders ... it is metadata. Searching, now that you are a LR user, is not done in your operating system and in folders, it is done in LR by searching for keywords and other metadata.

  • Image Field overwrite existing click event

    Using LiveCycle 8, I am creating a form which has an image which will change when the user clicks the image object.
    I downloaded the trial of Acrobat Professional 8.0. In this version, instead of creating a form in Acrobat, it uses LiveCycle 8. In LiveCycle, there is no Image Button and the Static Image object cannot be scripted. It seems the choice for a dynamic image object is the Image Field. But this object has a default click event which is not required in my form.
    Is there a way to replace the default click event on the Image Field object? I would like to overwrite it's click event with my own Javascript script. So far, I can add my own script in the click event, but then both my script and the browse for image file occurs.
    Thanks!

    You can't override an event but you could put a button over top of the image, make it the same color as the background, remove the caption and then when you click the image you are really clicking the button. You can put your code on the click event of the button. make sure the button is in the foreground and the image field is in the background.

  • Determine Image Position within it's containing graphic frame.

    Hi,<br /><br />I am trying to obtain the offset of an image item within it's containing frame. i.e. if I set the top left co-ordiante to be x:10pt , y:10pt<br />I need to obtain this programatically.<br /><br />I have tried using Both the ITransformSuite and ITransformFacade without much luck. The values I am getting are not what I expect.<br /><br />I.e.<br /><br />>K2Vector<PMReal> i_x;<br />K2Vector<PMReal> i_y;<br /><br />>Utils<Facade::ITransformFacade>()->GetItemsTranslation( UIDList( imageRef ), Transform::InnerCoordinates(), &i_x, &i_y );<br /><br />always gives me 0,0 ( as you would expect ).<br /><br />>Transform::ParentCoordinates()<br /><br />Gives me a value but it doesn't seem to be relative to the top left of the containing image item.<br /><br />The strange thing is that if I create 2 image frames and import the same image, I get different values for the positions within the parent ( even if the positions of the images within their respective frames are the same in the InDesign"Control" panel  ).<br />But if I create a box and duplicate it and then import the images, I get the same values for the offsets ( although they are still not what I expect ).<br />This difference seems to be related to the original position a box is drawn with on the spread.<br /><br />Ultimately, I would like to obtain the scale, rotation, skew and offset of an image and then apply those same criteria to another image ( possibly on another document ).<br /><br />TIA,<br /><br />Mike.

    Aperture already works the way you want it to. "Rejected" is just another rating. Like all ratings, it doesn't move your image from its Project. (You can make a Smart Folder to show images rated as "rejected" -- just like you can create a Smart Folder for any rating (or series of ratings).) To see rejected images in a Project just press "{Control}+8". This and other filter short-cuts are built in Aperture. Click the magnifying glass icon inside the search field in top border of the Browser to see them.

  • Applaying Online interactive form tutorial -Image field problem

    h1Assalam alikom
    hi all
    i faceing a problem with creating image field in adobe intercative form
    i followed the steps included in the online interactive from for image field but there is an error
    after rendering the form
    knowing  that it worked for the sample given with the tutorialh1
    The error is as follows
    script failed (language is formcalc; context is xfa[0].form[0].ReportData[0].#subform[5].imageField[0])
    script=this .value.image.href=xfa.resolveNode(this.value.image.href).value;
    Error:An attempt was made to reference property 'Value' of non-object in SOM expression
    xfa.resolveNode("http://amercet:51500/webdynpro/resource/xccre.cic.com/contract_print/Components/com.cic.xccre.enquiry.com_cn_print.com_Cn_print/villasZone.jpg").value

    Dear Engineer Naguib,
    Please refer to the following post:
    [Adobe Forms and Dynamic Images]
    this.value.image.href = xfa.record.Images.URL;
    Replace "xfa.record.Images.URL" by "xfa.record." + path to URL attribute in data hierarchy.
    Regards,
    Motaz

  • Find text and replace with image - Help needed

    Hi,<br /><br />We need to place the images as inline in the appropriate places.<br /><br />texttexttext<<test1.eps>>texttexttexttexttexttext<<test2.eps>>texttexttexttexttexttext< <test3.eps>>texttexttexttexttexttext<<test4.eps>>texttexttexttexttexttext<<test5.eps>>text texttext<br /><br />This code is helpful for placing a single image at a time, we are unable to place all the images in one shot, can anyone help me out.<br /><br />I am not a programmer.<br /><br />-----------<br />var myDoc = app.activeDocument; <br />app.findPreferences = app.changePreferences = null; <br />var math=document.search("test.eps"); <br />for (i=math.length-1; i >=0; i--)<br />{ myDir = Folder.selectDialog(); <br />AllGraphics = Folder(myDir).getFiles('test.eps') <br />for (i=0; i<math.length; i++) { app.select(anil1[i]); <br />     myDoc.place(AllGraphics[i],false); } }<br />-----------<br /><br />Note: I have taken this code from forum and we have made some changes on this.<br /><br />Kavya

    Jongware,<br /><br />I try running it but gives errors:<br /><br />Error Number: 55<br />Error String: Object does not support the property or method 'changePreferences'<br />Line: 24<br />Source: app.findPreferences = app.changePreferences = null;<br /><br />This is the code I used<br /><br />// Find text and replace with image for InDesign CS3 <br />// http://www.adobeforums.com/webx?128@@.3bbf275d.59b6f012<br />var heyItsAnArray = new Array ( <br /><br />   "it contains this line!", <br /><br />   "as well as this one", <br /><br />   "or even more!", <br /><br />   "test.eps" ); <br /><br />for (arrayCount=0; arrayCount<heyItsAnArray.length; arrayCount++) <br /><br />{ <br /><br />   replaceImg (heyItsAnArray[arrayCount]); <br /><br /> } <br /><br />function replaceImg (name) <br /><br />{ var myDoc = app.activeDocument;  <br />     app.findPreferences = app.changePreferences = null;  <br />     var math=document.search(name); <br />     for (i=math.length-1; i >=0; i--)  <br />     { myDir = Folder.selectDialog();  <br />          AllGraphics = Folder(myDir).getFiles(name)  <br />          for (i=0; i<math.length; i++) { app.select(anil1[i]); <br />               myDoc.place(AllGraphics[i],false); <br /><br />               } <br /><br />          } <br /><br />     }<br /><br />Michael

  • Uploading values for an image field in a web app. Nothing displays in layout.

    I've uploaded the values (using the import) for a field defined as an image in a web app. When I try to display the field, nothing shows up. The value correctly shows up when I look at Web App items after the upload / import. I've uploaded the same value in a text field, just to learn what was happening, and the text field displays the image just fine when added to the layout.
    I would like to use the image field type, as it's easier to correctly create the link when the web app is updated in the future.
    Here is what works in the layout: <a href="{tag_link to page}"> <img alt="" class="column66_award_thumb" id="thx" src="{tag_image thumb}" /></a>
    Note that {tag_image thumb} is a text field with the link stored in it. The value for each Web App Item which populates this field is a link to the image. (i.e. /Awards/139.jpg)
    Here is what I want to work: <a href="{tag_link to page}"> <img alt="" class="column66_award_thumb" id="thx" src="{tag_thumbnail image_value}" /></a>  , where {tag_thumbnail image_value} refers to a field defined as an image in the web app. It has the exact same value as {tag_image thumb}. I just copied the field values in the Excel spreadsheet (saved as .csv) when I uploaded it.
    It looks like the image field works fine only when I manually create it in the web app. If this is the case, using the upload capability disables any ability to use the image field type.
    Is there a workaround for this? Am I missing something?
    The page I'm working on is http://www.e-a-a.com/awards  When you view the source, you can see that the small thumbnail images are displaying just fine. (I'm using the text field). Whenever I substitute the image field name {tag_thumbnail image}, {tag_thumbnail image_nolink}, or {tag_thumbnail image_value}, the src value is always null.
    How do I fix?

    Hi there,
    To do it properly you need to resize the image. Prefably before you put it into BC. While you can for scale the image in CSS you do not want to do this. Why? Because the images are still very big and likely not optimised as they should be for the web.
    This means the page with these images will take a very long time to load for people, and people wont be to happy about that viewing your site.
    You need to use software such as photoshop if you have it or iphoto on a mac for example to edit, crop and size images before you upload them. If you do not have anything you can use free web based tools such as this one:
    http://pixlr.com/editor/
    You can also do this within BC itself in the file manager. If you click the image you can see options to resize it. The downside of that is that is done by pure math. It does not know what is in the photo and the results can make the image look squished etc.

  • Problems with image field and java

    Hi, i´m a beginner user of Adobe LiveCycle Designer, i create a form and i fill the text fields with a Java code, but when i try to dinamically assign a image on the image field of my form it doesn´t work, someone have any idea of whats happening or how can i manipulate the image field from Java code? thanks

    Session data will only last as long as the servlet container allows. In most cases (eg Tomcat) this defaults to about 30 minutes, but can be changed. Check that the session timeout configuration in your servlet container hasn't been set to "never timeout".
    Even if it had, I would have expected OutOfMemory errors rather than degrading performance. Although if the max heap size of the JVM has been set to a level higher than the RAM on the machine you could be getting excess page file usage.
    This probably wouldn't put CPU utilization at 99% though.. I suspect this is a code related problem.
    My best guess is one of two reasons:
    1. Somewhere in your code, or someone elses, there is a loop that never ends.
    2. There is a bug in the servlet container.
    I don't know which servlet container you are using, but I have used Tomcat extensively and never seen this behaviour.
    In terms of solving this problem, that's a tough one. I would try running the entire application within a profiling tool to see which threads are clogging up the processor. The Eclipse java IDE has a plugin called Eclipse Profiler which will allow you to track the utilization of code right down to the method level.
    If it were me, I'd be running the entire web application with a profiler like Eclipse Profiler and waiting for it to start clogging, then see who the guilty code is.

Maybe you are looking for

  • Drew13, a follow up?

    Back to the issue of text documents.... you suggested adding them to the DVD to be accessed on a computer via PDF. Based on what I have been reading, I assume I do that by selecting the content box under DVD-ROM and then specifying the folder that co

  • I forgot my security questions but I have my ID password, how can I change them?

    I forgot my security questions but I have my ID password, how can I change them?

  • Javascripts – check boxes not returning proper values

    Hi All, not sure if this is the right place for this post... but here goes.... here's the url: http://theexperience-exchange.co.uk/Mods_appleit.html The contact form generates and e-mail.  At the moment the results form the checkboxes look like this:

  • How to burn dual layers DVDs using DVD Studio Pro

    Hi I am having problem in burning the dual layer DVDs through Studio Pro. So what steps should I take to burn the DVDs. Thank you

  • ERROR WHILE INSTALLING 4.7 IDES VERSION

    Hi gurus,    I am getting an error while installing 4.7 ides version Please tell me how to go about ERROR 2007-07-01 14:24:30 MOS-01105  Processing of one or more file system node operations of table   Content of table: t_SAPComponent_Filesystem_Acti