Javascript in batch sequence stopped working

The following javascript used in a batch sequence is causing Acrobat to stop working. It was working fine, this problem has happened sometime in the last 2 weeks. This has affected all of our PCs regardless of Acrobat update version. We are running Acrobat 8 (8.15, 8.17, 8.21, 8.25). The only update common to all PCs is Windows Update.
/* Extract single pages to c:/Adobe */
// Regular expression used to acquire the base name of file
var re = /\.pdf$/i;
// filename is the base name of the file Acrobat is working on
var filename = this.documentFileName.replace(re,"");
try {for (var i = 0; i < this.numPages; i++)
this.extractPages({
nStart: i,
cPath: "C:\\Adobe\\"+filename+"_" + i +".pdf"
} catch (e) { console.println("Aborted: " + e) }
Any Clues?

Thanks for the speedy response. I tried this and the problem is still there.
I did some further testing and the original script, and the new one modified to include your correction, both work if the PDF only has one page.
With more than one page Acrobat 'has stopped working'

Similar Messages

  • Javascript in batch sequence

    I've done some Acrobat scripting but mostly through VB and I'm able to write what I need but I want to have it as part of my operator's Acrobat instead of the of separate program. That said, I want to write a Java script that I can include in batch sequence.
    I need to add a page to the start of a document and I want to have that page be nubered "a" without disturbing the numbering else where in the file. By simply adding the page at the start with the batch sequence it adopts the numbering of the first page. So if the first page is numbered as "i" then the new inserted page gets numbered "i" and the rest of the numbering changes, what was i becomes ii, what was ii becomes iii, and so on. I'm able to script this in VB by adding the page at the end, renumber them using the SetPageLabels from a Javascript object, then moving the page to the beginning.
    Is there any documentation on using Javascript within a batch sequence?
    Thanks,
    Ken

    Well, hacking along here working in the console pasting my code in.
    The script adds a single page from another Acrobat file to the start of the open PDF. I need the page that goes in at the front to be numbered "a" and NOT effect numbering in the rest of the pages. Some files work fine, other files not so much, like the Javascript API reference PDF as well as other PDFs we've created here form InDesign.
    The script inserts a page at the end of the PDF and numbers that page "a" then moves it to the start of the document. The problem occurs when the page is moved to the start, it changes the number of all the other pages to follow page "a" which is a bit of a silly thing to have to send my clients. I decided to compromise and if the first page (before I insert the anything) was numeric I would simply try changing things to start page 1 after my inserted page "a".
    My code looks like this:
    var NumPages = this.numPages
    var PgLabel = this.getPageLabel(0)
    this.insertPages(NumPages-1, "/F/TNTSTUFF/Disclaimers/HUP_ProofNotice.pdf")
    this.setPageLabels(NumPages,["a", "", 1]);
    this.movePage(NumPages, -1)
    if (PgLabel.match("((-|\\+)?[0-9]+(\\.[0-9]+)?)+")) {  
            this.setPageLabels(1, ["1", "", 1]);  
    However, the setPageLabels command is causing this error:
    RaiseError: The base pages object is missing or invalid.
    Doc.setPageLabels:7:Console undefined:Exec
    ===> The base pages object is missing or invalid.
    I'm not sure it is relavent, but on the files that work the numbering in Acrobat looks like this with the parentheical numbers:
    Files that DON'T work look like this, with NO parenthetical:
    Even if I manually renumber the pages starting with 2 to make the numbering in the 2nd file look more like the numbering in the first file, I still get the error.
    Is there a way I can overcome this with Java code and what the heck is it?
    Thanks again to anyone who can help.
    Best,
    Ken

  • Browse Sequence Stopped Working

    I generated WebHelp output files on 11/19/14 (less than 2 weeks ago) in which the browse sequence works as expected.  When I generated output today, I noticed that the browse sequence buttons were not displaying.  I'm using RH 10 with IE 11.  I am the only person who accesses the RoboHelp project files for this project.
    I checked the WebHelp project settings and noticed the "Enable Browse Sequence" box was not checked.  I checked it.  I regenerated the project.  The browse buttons now appear but remain disabled.  I used the Browse Sequence Editor to regenerate the browse sequence from the TOC.  It did not work as expected.  Instead of following the TOC sequence, it put all the first-level books at the beginning of the browse sequence, then all the second-level books, and so on.  Just the same, I saved and regenerated the project.  The browse buttons still appeared, but still remained disabled.  I used the Browse Sequence Editor again to regenerated the browse sequence based on the TOC using the option to create separate browse sequences for each book down to level 5 (just an arbitrary number).  RH created a bunch of separate browse sequences.  I clicked OK again and regenerated the project.  I still see disabled browse buttons, and I tried clicking multiple topics in different books to see if any of the separate browse sequences worked.  The browse buttons remained disabled.
    I reviewed previous RH posts on this subject.  I saw Julietta Curtis' post on browse sequences not working in IE 10 but working in Chrome and Firefox.  I opened in Chrome and Firefox the last two versions of the WebHelp I generated; same results as IE 11--disabled browse buttons.  I opened the WebHelp from 11/19/14 in Chrome and Firefox; the browse sequence works fine.
    Note:  I also tried regenerating the project using the project's .BRS file from prior processes--including .BRS files going back to 10/29/14.
    Any thoughts on how to get the browse sequence working again?  Thanks!

    Amebr, I would still be interested in knowing what you mean by "For the buttons, perhaps make sure your browse sequence hasn't become unticked in your SSL?"
    I have tried everything I can think of.  I took a copy of the .hhc (TOC) file, reformatted it as a .BRS file using the structure of a valid .BRS file from another project, named the browse sequence (although that doesn't seem to matter), opened the Browse Sequence Editor and verified that I can view the browse sequence and view links from the Browse Sequence Editor, and re-verified the "Enable Browse Sequence" box is checked on the WebHelp Settings window.
    RoboHelp appears to recognize the named BRS file as a valid BRS file, and it exactly matches the structure of the TOC because it was created from the TOC file.  The generated project still just shows disabled browse sequence buttons (which are an indication that the browse sequence box is checked because the buttons do not show up at all if it is unchecked).  Open to any suggestions on how to get this to work.
    Don't think this is related, but ran a batch generate process on a different project and received a message that MS Word is not installed.  RH appears not to have been updated when my MS Word was updated from 2007 to 2013.  Was still able to generate the other project, and its browse sequence works.  What do I need to do to get RH 10 to recognize MS Word 2013?  Again, thanks!

  • Adobe Bridge Batch Rename Stopped Working

    ive been using bridge exclusively to rename/
    organize my files and today for some odd reason it just will not work. i select the files i wish to rename and then select batch rename and name/numer the files as ive always done before and when i click rename nothing happens at all. i cleared out my cache to no avail and im now officially stumped. any help is appreciated. thanks!

    Your problem does seem odd.  Difficult to troubleshoot by remote, so run a few tests and see if you can narrow the problem down.
    By any chance are you trying a batch re-name of files on an external drive?  If so may be permissioning problem.
    Do you have this problem in all folders or just one?  If one there may be a contaminated file or name (i.e. flower.jpeg.jpeg)
    To avoid fouling up your files copy a dozen or so and put in "test"  folder then run these tests.
    Can you do a simple rename of one file?
    Can you do a batch rename of one file?
    If the above is true can you do batch rename for all files in this folder?
    If so does the extension make any difference - jpeg, psd, etc.?

  • Batch rename stops working after initial folder

    So I have a tonne of video frames to rename.
    I batch rename the first folder with about 1000 images. Everything works fine.
    I go to next folder, click batch rename...nothing happens. I try everything including purging cache and trying again...nothing.
    Only thing that works is when I restart Bridge.
    Help?

    This can be a problem with the file places.sqlite that stores the bookmarks and the history.
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • When did javascript to Resize windows stopped working?

    I just upgraded from Fx3.6.8 to Fx16.0.2, and now my javascript bookmarklets are not working. There doesn't appear to be any way to resize a window quickly by clicking a bookmark containing a javascript function, such as:
    javascript:(function(){window.moveTo(22,33);window.resizeTo(560,(screen.availHeight-35));})();
    I've noticed the same problem in Fx22 on a different computer. So apparently, even with javascript enabled, these functions don't work from the URL line.
    Is there any way to resize a window, other than by manually dragging a corner?

    jsher, NO, not a screen shot, a cmd-P (print). Even with "style" as follows:
    <style type="text/css" media="print">
    @page onepage {size: 8.5in 11in; margin: 1cm}
    BODY {page: onepage; font-size: 9pt}
    TABLE {font-size: 9pt}
    </style>
    The page doesn't print properly. And I believe javascript, as you suggest, doesn't work anymore within an html-page. My web server creates a form the recipient is supposed to print, and it doesn't print properly. I'm not doing the printing, the recipient is doing it, and they're NOT very computer literate.

  • Batch sequences not working (Acro9)

    I have a directoy full of PDFs I want to remove personal data from so I create a new sequence, and under output options, settings I check all the boxes under discard user data. I then run it on the dir saving the PDFs in a new location, but the new PDFs still have all the metadata in them. Anyone know what I should be looking to fix?

    any ideas?

  • Bridge - Batch Processing has stopped working...help

    I am using Photoshop for Windows in CS2. Have been for years. Work with batch processing and Web Gallery all the time...for years.
    Batch Processing and Web Gallery stopped working (along with other Photoshop features). I upgraded to Windows 7, and photoshop/bridge/indesign, etc work once again.
    Batch Processing and Web Gallery still don't work. When I select items Bridge and click "Tools", "Photoshop", "Web Photo Gallery" it clicks over to photoshop, as if the process is about to begin. But then Photoshop lies there doing nothing. No action menu pops up if I select "Batch" no "Web Photo Gallery" dialog box initiates if I select the gallery.
    Any assistance, that can save me the $1000 on a CS upgrade, will be greatly apprecieated.
    Thank you for your time.

    Look in edit/preferences/scripts and make sure there is a checkmark for both Bridge and Photoshop.  Without that they can't talk.

  • Batch processing through bridge stopped working...

    10 + years PS user...  I Cloud user....  My batch processing hrough the bridge stopped working.  Tried everything I know to get it working.
    any ideas

    We need to know a lot more to help you. Please provide answers to the questions listed here: "FAQ: What information should I provide when asking a question on this forum?"

  • Batch Sequence with JavaScript

    Hi Guys,
    I have a batch sequence that won't save the original files. I'm getting a message "The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder."
    However, another batch sequence that runs on the same file saves it fine so I know that noone else has it open and that and I know I have rights to that folder.
    The sequence that won't save the file sets the open optons and has JavaScript in it that collapses the many bookmarks.
    Is there something about having JavaScript in the batch sequence that's not allowing this to save?
    Many thanks,
    Ken

    You rock!! That made it all go.
    I was mistaken befeore thought, its the JavaScript Editor that's coming up on the screen when I run the sequence. I have to close it with the OK button before the sequence finishes. It comes up for each file I process. Trouble is I can't imagine what I've changed that would cause that to start happening.
    The code looks like this:
    //Collapses all bookmarks and shows the bookmarks panel
    function BookmarksCollapse(bkm, nLevel)
    var s = "";
    for (var i = 0; i < nLevel; i++);
    bkm.open=0;
    if (bkm.children != null)
        for (var i = 0; i < bkm.children.length; i++)
            BookmarksCollapse(bkm.children[i], nLevel + 1);
    BookmarksCollapse(this.bookmarkRoot, 0);
    //app.execMenuItem("ShowHideNavigationPane");
    //app.execMenuItem("ShowHideBookmarks");
    this.saveAs(this.path);

  • Two days ago two of the forum I use stopped working as they did. Google Chrome can open these sites without problem. I have checked that Javascript is working. What can I do to get the sites back to the way they were?

    Two days ago two forums I regularly use stopped working properly. One of them is www.mobileread.com, and the main problem is with marking the forums read. The staff there suggested that I check that Javascript is enabled. It is, but the problem remains.
    The other site just looks as though there is no styling on the index page; it just shows a list of links.
    I can use both sites with Google Chrome just as I did before, so it has to be a problem with Firefox.
    There are many other sites I visit, and I have not had the same problem there.

    For the one with a styling problem, see what you have for View > Page Style
    the normal style is default and "No Style" would wipe out styling but in this area it would apply to all pages.
    I don't know of an extension that would selectively turn page styling or off, but look at your extensions.
    Both problems could be caused by filters added to "Adblock Plus" extension.
    Bring up "Open blockable items [Ctrl+Shift+V]" in ADP by right-clicking on the toolbar/addons bar icon or in the add-on's options. See what is being blocked and the filter that is blocking it. You can easily test filters there and turn them on/off and retest. You can see the filter that is blocking an item, you can use the mouse to see where that filter came from. Choices of what columns to display can be made with the little icon to the right of the column headings in the list.
    Attached is a picture of blockable items I see for the www.mobileread.com page. To view a page that you need to view or use, you can try modifying your filters or toggling the "State" column (preferred). You can disable Adblock Plus from the extensions options but that defeats the protection it offers.
    If seems that the problem would be an extension, or a style, or theme.

  • Batch sequence to remove document JavaScript

    Does anyone know of a batch sequence that can remove the document JavaScript from a group of Acrobat 9 Pro PDFs?

    If the doc-level Javascript names are not known in advance, then the only way I found to remove all of the Javascripts is with doc.extractPages(), which will create a new doc object, and then newDoc.saveAs() followed by newDoc.closeDoc().
    I don't do this in a batch sequence but in a .Net app, so I'm not entirely sure how you would write this in a batch sequence.  Here's a code snippet that shows the basic logic:
                    object AcroJS = AcroPDDoc.GetJSObject();
                    string PdfFullPath = "C:\\filename.pdf";
                    Type T = AcroJS.GetType();
                    object newDoc = T.InvokeMember("extractPages", InvokeMethodFlags, null, AcroJS, null);
                    AcroJS = null;
                    AcroPDDoc.Close();
                    object[] saveAsDataParam = { PdfFullPath };
                    T.InvokeMember("saveAs", InvokeMethodFlags, null, newDoc, saveAsDataParam);
                    T.InvokeMember("closeDoc", InvokeMethodFlags, null, newDoc, null);
                    newDoc = null;
                    AcroPDDoc.Open(PdfFullPath);
                    AcroJS = AcroPDDoc.GetJSObject();
    This can also be used to create a new doc GUID.
    Bill

  • Javascript stopped working -- Firefox Ver.28

    This is an FYI --
    - My Firefox installation was updated to version 28 on March 18th.
    - Early this morning while working on a web site javascript stopped working on my home computer.
    - I finally realized that it was working on my office computer (also running version 28) but not my home computer.
    - JavaScript was "enabled" on my home computer according to the about:config information.
    - I tried many of the posted suggestions for this issue; running in safe mode, checking prefrences, etc. but nothing I tried had any effect.
    - I reset my home comptuer's Firefox app. and javascript started working again.
    I'm not sure what got modified after the reset but all is well again. If any information from my configuration can be helpful just ask.
    Mike

    The people who answer questions here, for the most part, are other Firefox users volunteering their time (like me), not Mozilla employees or Firefox developers.
    If you would like to file a bug report for the developers, please file one on [http://bugzilla.mozilla.org/ Bugzilla].

  • Javascript stopped working

    Javascript just stopped working. I've tried toggling it on and off but this didn't help. this has affected every site that I know uses Javascript. The only thing I've done recently that I could imaging affected it was to install Vidalia (in order to use Tor), but I am not running it at the moment.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • JAVAscript MM_goToURL iframe function has stopped working

    I've been using a piece of javascript generated as part of an old version of Dreamweaver for a few years now with no problems. However, I visited my site the other day and discovered that one of the functions for 'MM_goToURL' has stopped working. I use this function to travel between pages in the site as well as changing iframes located within certain pages. While the code still works for moving between pages, it no longer works for iframes (or at least not on this site).
    Could I ask for someone to look over my simplified code below and note any errors that may have crept in? Thanks.
    JAVAscript code: (file location: javascript/design.js)
    function MM_goToURL() { //v3.0
       var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
       for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    HTML:
    <!DOCTYPE HTML>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link  rel="stylesheet" type="text/css" href="css/food.css" />
        <script type="text/javascript" src="javascript/design.js" >
            </script>
    </head>
    <body>
    <div class="button" onClick="MM_goToURL('iframe','text2.html');return document.MM_returnValue" >Text</div>
    <iframe id="iframe" src="text1.html" frameborder="no" scrolling="no" ></iframe>
    </body>
    </html>

    I've now solved the problem by adding the criteria of 'name="iframe"' to the iframe code.
    All fixed! :-)

Maybe you are looking for

  • Swf won't play after uploading - white box

    I've posted a couple of previous times and gotten nothing but dead air, so I'm still trying to find a way to get flash movies to just play on a web site. Is it that hard? I hate flash. Why doesn't it just work? I'm trying to put a video gallery up an

  • Flash Builder Export Release Build Fails

    I'm having an issue when trying to export the release build of my AIR application in Flash Builder 4.5.  After choosing the key to sign the package and clicking finish to complete the export, it errors saying that "Error occurred while saving the pro

  • String[] sa = {"one", "two", "three"} with other types, too?

    String[] sa = {"one", "two", "three"} is a nice abbreviation in instantiating an object and initialize with multiple elements in one line of code. are there similar syntax abbreviations for e.g. HashSet?                 HashSet hs = new HashSet();   

  • Tell me logic for this?

    In VA01, one field VBAP-PRODH, its length is 18 char suppose its having value 1040201030. here two charecters is one level. I need to check first two levels, can you please tell me how ? ie if product heirarchy determines this JET FUEL (4) = 1030 how

  • Green screen compositing, why does red specs appear on my finish composition

    Hi, I am compositing some green screen scenes. When fininshed, I render them into Quicktime .mov's (using Avid DNXHD codec). When I play them back on my computer, they look fine. But I tested them on a fairly new 52" LCD television, and saw little re