How to find and replace in the Javascript code?

Hi all!

I hope that this proves to be an easy question! We have recently updated several forms (about 50 of them) to change a set of names of fields by the requirements of the customer. However, it turns out that one of these fields is a key field and it is referenced in one or more places of JavaScript in the PDF.

I would choose the option to edit all of the scripts that would give me a large document with all the Javascript code in the PDF in Acrobat 6. I could then do a find/replace on the code and save it. Now, using Acrobat 9 Pro, I don't know something like that. Please don't tell me that I have to search in all fields in different form and PDF objects to find all the pieces of script related to objects or events! I'm really, really hoping that there is an easier way to do it from right now, I'm ideas and really do not want to have to sift through all the objects in more than 50 PDF documents.

Thanks in advance for pointing me in the right direction!

Go to the Advanced section - Document Processing - Edit Document JavaScripts...

(or something similar, don't have it in front of me at the moment)

Tags: Acrobat

Similar Questions

  • How to find and replace data in fields of form in acrobat xi, its not allowing to do while trying, one

    How to find and replace data in fields of form in acrobat xi, its not allowing to do while trying, request adobe livecycle to settle. Help, please.

    Best way to do is the following:

    -Open the PDF in Acrobat.

    -Go to tools - form - form more Options - export data.

    -Save form data in an XML file somewhere on your system.

    -Open the XML file in a plain text editor (I recommend Notepad ++).

    -Let's say you want to replace all the years in dates "2013" to '2014 '. Do a global search & replace '2013-' to '2014' - (I added the dashboard in order to ensure that only the date fields are changed).

    -Save the XML file (maybe under a new name).

    -Go back to the PDF file and now go to tools - forms - more form Options - import data.

    -Select the modified XML file and import it.

    -Fact!

  • How to find and replace this text in the url

    I have a NCLOB column with a text with the url between the two as shown below:
    ========================================================================
    This text is intended to testign. This text is intended to testign.
    < a PL/SQL and SQL < U PL/SQL and SQL / < u > < / a >
    Required text is also aimed at testign. This text is intended to testign.
    < a http://forums.oracle.com > < oracle metalink U > < / u > < / a >
    This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign.
    ========================================================================
    Requirement:
    ========
    It is necessary to implement find and replace functionality.
    I just need to check if the search text is present in the url or not?
    Suppose that if research of orcale.com, given that research should therefore be successful otherwise search for his part of the url must be unsuccessful.
    Here, I can give you the indicator, as always the url is located between the anchor tags * (< < /A >). *

    Tahnks in advance.
    SELECT REGEXP_SUBSTR('testhttp://forums.oracle.comoracle.comhttp://ora.com', '((.*?oracle\.com.*))') FROM dual
    
  • Find and replace only the changes in Notepad

    I recently upgraded from RoboHelp 6, RoboHelp 8. In version 6, RoboHelp was configured to open HTML files to find several files, and replace in RoboHelp self rather than another HTML editor. Now that I've updated, when I perform a search using find and replace in files, select a file from the results and then click on the button Edit, the file opens in Notepad. The same thing happens with the computer to a colleague, who has recently upgraded.

    This happens no matter how I configured my OS and RoboHelp. So, for example, it seems not important to know if the following options are selected:
    * Under Tools | Options, Associations, Auto selection Editor tab may be selected, or use the default editor can be selected. This does not change the behavior.
    * Under Tools | Options, Associations, design view < internal > tab can be defined as the default value. Once again, no effect.
    * Under Tools | Options, on the Associations tab, file Associations can have. HTM being edited with RoboHTML.exe. No help there.
    * Under Tools | Options, on the general tab, check to editor HTML system can be selected or not. No luck. Despair is sinking...

    I'm not sure if the operating system settings make a difference, but it is set to open the .htm and .html files in Internet Explorer. It seems that it would not make a difference, however, because clicking on change in RoboHelp find and replace in files does not open the files in Internet Explorer. When you click view, it opens files in Internet Explorer.

    Thank you in advance for your help!

    James Gage, CSC
    The United States State Department

    Welcome to the forum.

    I no longer have access to RH8 but here is what I think happens.

    RH7 presents the multidocument Interface and removed the ability to edit simple themes. Multi file find and replace opens a topic in some tool was selected in Internet Explorer to edit HTML files.

    As HR cannot open a single file, if you do not set IE use HR, you're wasting your time because it cannot do. It must open a project and of IE, it can't do.

  • The difference between the "Find and replace" in the menu and FindChangeByList.jsx

    Hello! Please help me. Why this work ' find and replace ' (grep), but not working in FindChangeByList.jsx

    find replace
    \r\d (.) \D\d0$ 0

    This procedure find enter, any digit, any digit, any digit and replace all in 0, found.

    Example:

    front after

    7.35

    0

    7.35

    But it does not work in FindChangeByList.jsx (file: FindChangeList.txt):

    grep{findWhat: "\r\d (.)} \D\d"}{changeTo: "0$ 0"}{includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false}

    And it does not work in the present:

    myDocument var = app.documents.item (0);

    app.findGrepPreferences = NothingEnum.nothing;

    app.changeGrepPreferences = NothingEnum.nothing;

    app.findChangeGrepOptions.includeFootnotes = false;

    app.findChangeGrepOptions.includeHiddenLayers = false;

    app.findChangeGrepOptions.includeLockedLayersForFind = false;

    app.findChangeGrepOptions.includeLockedStoriesForFind = false;

    app.findChangeGrepOptions.includeMasterPages = false;

    app.findGrepPreferences.findWhat = \r\d (.) « \D\d » ;

    app.changeGrepPreferences.changeTo = "0$ 0";

    myDocument.changeGrep ();

    Please help me understand. Thank you!

    in findChangeByList you have to escape the string:

    {findWhat : » \d(.) \r\\ \\d\\d"}

  • How to find and replace text in the index entries?

    Hello

    Recently, I copied a manual to create a new one for another product. After a global search and replace the product names and other texts, I needed to replace a specific word that appears in the index entries.

    I noticed the search box would allow me to search the text of the marker, but I had to replaceme the word by hand - cut and paste the new Word, click on change the marker to save it and then find the next occurrence.

    It's with frame 7.2. Does anyone know a faster way to do this?

    Yours,

    Michael F.

    =========

    Peter,

    Thanks for the lead.

    I downloaded the zip file and all it contains is a DLL file, but no instructions.

    What should I do to make it work and how do I know that it works?

    Yours,

    Michael F

    ========

  • How to find and replace a URL in the content

    See the following page:

    http://democraticpartyofgeorgia.org/events/index.cfm?fuseaction=week & SM = 9 & SD = 9 & SY = 2007

    He pushes the margins way because some people type in long URLS in their description of the event (see the meeting September 10). I would like to be able to analyze the event description and replace that long url with a hyperlink where the long url is in the attribute href, but which is related is something link 'see link'. Is it possible to do? I can search for the instance of "" http:// ' of course, but can't seem to find a way to tell where the ends of the link... "

    Look at the ActivateURL udf to
    http://www.cflib.org/UDF.cfm/activateurl

    It's really more a question on a very long word of packaging. The URL is not packing, and it's what drives your margin. You need the column to encapsulate your column is a bit more liquid.

    Use the wrap() function CF.

    You can also go the road CSS, but the best solution I found only works on IE.

  • Find and replace in the script editor

    I wonder if there is anyway in the script editor to perform a search and replace?  I can do a find by pressing cmd + f then if I hit shift + tab, I can stick it to the highlighted area which is great for a couple, but when I have a bunch of stuff is a pain.  I want to just do a replace all in the editor.  I can cut and paste the script in the editor for this, but I hope there is a key combination which makes appear a replacement all the dialogues.

    Unfortunately there is no gimmicks to replace. It's just not there.

    Another feature request Paul!

    Christophe.

  • How to find and delete all the exact words

    How search and delete all the exact words, I tried adobe 11 Pro and I still need to know how to do this

    No, this feature in Acrobat Pro XI can remove all occurrences of the text you're looking for in a single operation.

  • Find and replace function in file names?

    Is it possible to do a find and replace in the names of files, rather than the office or similar?  I have a large list of names of files that all have a problem with them I want to replace, but I don't want to pass by and do each manually!  A better way to do it?

    Rob

    Hello exoticdisease,

    Thanks for posting on the Microsoft answers Forum.

    Select the files in Windows Explorer, press and hold Shift and right click on them. Choose copy from the menu in the path. Paste the list in any editor you prefer. You get the full path for each file, but a simple find/replace will clean up if necessary.

    I don't know if it of what you're looking for or not.

    If please reply and let us know if this solves your problem or if you need further assistance.

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Chinese characters appear from nowhere, then using find and replace in dreamweaver

    It is a strange, Chinese characters appear from nowhere, then using find and replace (in the folder) in dreamweaver. the replacement text is Chinese characters on the open document, others are ok

    Sounds like the Configuration of your entire file is damaged.

    Rename your folder Dreamweaver MX\Configuration Old_Configuration.

    When you restart Dreamweaver, it will create a new Configuration file for you.

    Good luck!

    Nancy O.

  • Find and replace (CS6) results: column too narrow location

    When I use search in the find and Replace window, the location of the results column is too narrow to be useful, and I can't make it any wider, despite plenty of room in the window.  See screenshot:

    FlashCS6_FindandReplace.jpg

    I use Flash Pro CS6 v12.0.2.529 on Mac OS X 10.7.4.

    It is a frustrating problem.  Is there a solution?  If this isn't the case, should I file a bug report?

    Thanks, ~ jason

    I thought about it.  The 'Type' column width was maximized in some way.  I need click and drag on the right border of the column to make it smaller.  Then there was room to make the 'Place' and 'Put in correspondence of the elements' more wide.

    Just weird.

  • How can I find and replace the xml tags?

    Hi, I am using xml in my workflow and want to be able to remove some tags if they contained particular text.

    Here is an example of the xml struct...

    < Entry >

    < name > DEFAULT < / name >

    < such > default < / such >

    DEFAULT < address > < / address >

    < / Entry >

    I use this initial structure to define paragraph styles to follow when you import the xml data.

    This leaves DEFAULT in place everywhere where an entry is not any content of this field.

    I want to be able to import my XML and then run a script that deletes tags that include by DEFAULT, - I need to the xml tag to remove not only the text, if I do a normal find and replace will remove only the text not the tags that is causing problems with style. I also want to remove the end of para/return (^ p) that I placed at the end of the line. So it would be the same opening editor mode and removing content, tags + hard back in there, but I want to automate the process...

    So I think that's what I'm looking for in each case

    "< name > DEFAULT < / name > ^ p.

    and I want to replace it with nothing.

    Is this possible in a script (ideally javascript)?

    I have a little knowledge of javascript, but don't know how to search for and target this kind of string in indesign...

    using indesign cs5

    Thank you very much

    Hello

    Script should do it in two steps:

    1 find all occurrences of that is ' > by DEFAULT.<>

    2 delete the whole paragraph which is a found_text container.

    For example, in this way - JS - (a textFrame filled your text must be selected):

    var mStory = app.selection[0].parentStory;
    app.findTextPreferences =  null;
    app.findTextPreferences.findWhat = ">DEFAULT<";
    var myF = mStory.findText();
    var count = myF.length;
    while (count--)
         myF[count].paragraphs[0].remove();
    

    Rgds

  • Ideas: I get the 0x80073AFC error code when I try to use the system restore then, how can I find and replace this file missing MUI?

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas: I get the 0x80073AFC error code when I try to use the system restore then, how can I find and replace this file missing MUI?

    • I am running Windows 7 for packs SP 1 or SP 2 does NOT solve my problem since neither one works with Windows 7.  Is there a way to search for this MUI (Multiple User Interface) missing file? The every thing must have himself installed in the first place. I took my mom (she died in June) and my brother on this PC as users so even if they do not use this PC supports multiple users. Maybe if I deleted as a reboot and additional users it will solve my problems. My updates install OK but I can't run at all system restore. It creates a restoration point OK but when I try to sr back to a restore point before I get the error 0x80073AFC topic of the missing MUI file. Then, when I spear SR it is said that he could not and no files have been changed because of the error 0x8000FFFF error, unspecified catastrophic failure and could not retrieve the file several times when system restore is attempted.

      I'm running Windows 7 on a HP Pavilion with browser Firefox 3.6.8 browser Opera 10.60, IE8 and Google Chrome 5.0.375.125 browser browser.

      Can you tell me what I try next? Thnks a lot and sayonara for now the guy-Jack McElwee / keimanzero the Scion of the Anime in Brookhaven PA - USA

      OK I tried everything and nothing works! Only added beginners are updated browser Opera 10.63; IE9 (Beta); Firefox 3.6.12 and Google Chrome 7.0.517.41 and Java 22. Of course like everyone else in the world, I had to uninstall/enable and disable/download again and reinstall new Adobe Flash 10 and 11 of the shock wave and they keep crashing too! Hello 4 keep screwing browsers and now I get connection network problems. I run Comcast doctor and did everything it said to do, but nothing works. Oh and I added 7-Zip and WinZip also. Likewise, they will not work! Help! Thanks - K & K

    keimanzero,

    Comcast of Norton Security Suite version is installed? If Yes, who and perhaps malware is most likely to cause questions you have published, in particular the failure of the restoration of the system.
    First, configure the system to boot - How to solve a problem by performing a boot in Windows Vista or in Windows 7
    NOTE: Start-up mode minimum state all the 3rd party firewalls will be disabled. Open Control Panel > Windows Firewall to make sure that the native firewall of Windows 7 is now on.

    Download and Save the update system (or CheckSUR) tool. You will need to download the specific Version of CheckSUR corresponding to the architecture of the system to Windows 7. If you do not know the architecture of the system, and then click the link that says "Click here to show or hide the instructions step by step with images" under method 2: download the update directly system preparation tool from Microsoft Download Center .
    Description of the preparation tool system update for Windows Vista for Windows Server 2008, for Windows 7 and for Windows Server 2008 R2

    Once the download is complete, close all open programs and browsers. Now, run CheckSUR with the system connected to the internet because it will download the .cab for system files. Reboot once CheckSUR is complete.

    Secondly, I suggest that you run the File Checker system while in the same clean boot state.
    To run the System File Checker tool, follow these steps:

    1. Click Start and type cmd in the field search programs and files .
    2. Right click on cmd.exe in the programs of list, and then choose 'run as administrator '.
      If you are prompted for an administrator password or a confirmation, type your password or click on continue.
    3. At the command prompt, enter the following line exactly as written including the space between thec and the/and then press ENTER:
      sfc/scannow

    When the analysis is complete, test to see if the problems facing the system have been resolved.

    If they are not, you will need to contact Norton support for the version of Norton Internet Security Comcast to get help, or just uninstall NIS, run the Norton removal tool (right click Norton_Removal_Tool.exe, choose "Run as Administrator"), reboot and then check to see if the problems are still occurring.

    Expert MowGreen Windows IT Pro - consumer safety

  • A Script to find and replace the layer names

    Is there scripts to find and replace the names of layers?

    There is an excellent script available for Photoshop that allows you not only to replace words in layer names, but also insert words as prefixes, Suffixes and sequential numbers.

    The version of the illustrator of this script allows only sequential numbering: it does not offer search and replace words.

    Ideally, it would be great if there were something that could find multiple and replaces in a go:

    (for example

    You have layers like this car, the dog, the bat

    You enter: because (Option1), dog (Option2), Bat (Option3)

    Your layers become then: option 1, option 2, Option3).

    )

    Big_SmiLe, which is a very good start! Step 1 of learning how to Script is indeed, by adjusting an existing simple script to make things more complicated. (And usually then "break something", which is also a necessary part of the process.)

    You are right your comment, it comes to repetitive things. For one or two different articles that wouldn't be a problem, but in the longer lists you are soon lost.

    As usual to work with lists of search - replace is to build a table:

    var layernames = [
    [ 'FHairBowlBoy *Hair', 'Hairboy1' ],
    [ 'FHairCurlyafroBoy *Hair', 'Hairboy2' ],
    [ 'FHairSpikyBoy *Hair', 'Hairboy3' ],
    ];
    

    The general idea is to loop through all the names, check if the current layer name is "layernames [i] [0]" (the left column) and if so, rename it "layernames [i] [1]" (the right column). If you know how to write a loop in Javascript, then you can implement this immediately.

    However...

    A more advanced method to do this didn't need even loop on all layernames - instead you can immediately 'get' the correct name by layer! It's magic! Almost!

    The trick is to use a Javascript object rather than a table. JavaScript objects are nothing special; "Layers" of Illustrator are an array of objects, and each object 'sex' has a 'name' property, which you can read and set the value. What I do here, is to create a new object, where the part 'name' is the name of the original layer and its value is the name of the new layer. All you need to check each layer is if there is a "object.originalLayerName" property and if so, assign its value to this layer name.

    It looks a bit like the table above, except that (1) you use {.} instead of [..] to create an object and (2) you add pairs "name: value" instead of 'value' only (in fact, the 'name' of a value in a table is simply her number).

    So here's what it looks like:

    // JavaScript Document
    var doc = app.activeDocument;
    // name indexed object
    var layernames = {
     'FHairBowlBoy *Hair':'Hairboy1',
     'FHairCurlyafroBoy *Hair':'Hairboy2',
     'FHairSpikyBoy *Hair':'Hairboy3'
    };
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++)
    {
     //Set up Variable to access layer name
     var currentLayer = app.activeDocument.layers[i];
     if (layernames[currentLayer.name])
     {
      currentLayer.name = layernames[currentLayer.name];
     }
    }
    

    Enjoy!

Maybe you are looking for