How to strip out leading numbers in auto-generated bookmarks?

For years now my team has used an Acrobat plug-in called Compose, which lets us strip out the leading numbers from bookmarks in PDFs generated from FrameMaker 7.2. (The tool works after the fact, so that all bookmark creation occurs after the PDF is created.)
For example, these document headings:
1.1 Intro to Happy Fun Ball
1.1.1. System Requirements
1.1.2. Cautionary Information (WARNING)
are translated to the bookmarks:
Intro to Happy Fun Ball
System Requirements
Cautionary Information (WARNING)
After evaluating the new Adobe Tech Comm Suite, it seems that Acrobat 9 Extended Pro isn't compatible with the Compose plug-in (or at least, the version we've been using for years).
Does anyone know if there's a method -- built into either FrameMaker 8 or Acrobat 9 Pro Extended, or in an SDK -- that allows you to auto-generate bookmarks but strip out leading numbers? It seems this is a no-brainer of a feature, yet I can't find it listed anywhere in the Acrobat documentation.
Other names for this feature might be "wild card" or "text masking," not to mention "strip leading numbers."
Thanks very much for your help.
Regards,
Buster

The following code can be run from the JavaScript console, but since you're new to this, it might be easier to create a button, paste the code shown below into the Mouse Up event of the button, select the Hand tool and click the button to execute the code, and then delete the button if everything is OK.
If you need to do this a lot, you should consider setting up a custom menu item or toolbar button that executes this code:
function removeBookmarkPrefix(bookmark) {
    // Resursive function to remove bookmark prefix
    // Rename bookmark without prefix
    bookmark.name = bookmark.name.replace(/^\S+\s+/, "");
    if (bookmark.children != null) {
        for (var i = 0; i < bookmark.children.length; i++) {
            removeBookmarkPrefix(bookmark.children[i]);
// Remove all bookmark prefixes, recursively
removeBookmarkPrefix(bookmarkRoot);
The code uses what's called a regular expression, which in this case is fairly simple: /^\S+\s+/
This regular expression means to search the bookmark name for the beginning of the string (^), followed by one or more non-whitespace characters (\S+), followed by one or more white space characters (\s+), and replace all that with an empty string (""), thus removing it. This should work with the bookmark name prefixes you describe.
The function is called recursively, which is an efficient way to handle the hierarchical structure that the bookmark tree can have.
If you get stuck, post again.
George

Similar Messages

  • How to find out color numbers

    Hey everyone
    Just wondering how to find out the color number codes in iweb?
    Thanks
    Bevan

    Bevan are you talking about the Hex values? Like #3C3C3C?
    I have to know those values as well when I'm creating stuff in Photoshop. I use Art Director's Took Kit to do that. I use the magnifying glass to capture the color from iWeb and then copy the hex value it gives me.
    I'm not sure if iWeb's color picker gives hex values - haven't found it yet if it does. But that's how I do it. Art Director's Tool Kit came with my Mac so you should have it as well.

  • How come SP 2010 overlay will not auto generate the sidebar (where you choose which calendar you want to view) doesn't pop up? (image inside)

    I only get this http://i.stack.imgur.com/VR4Yh.png without anything else auto-generated. Am I doing something wrong or is my version restricted?  
    Thanks.  
    Kieran

    Hi Kieran,
    Depend on your description and image, the web in SharePoint 2010 in your environment doesn’t display the left part.
    Do you configure any custom settings in the page?
    You can use IE developer toolbar(F12) to find the style of the left part of this web. And check whether the style is hidden and deleted.
    Here is the link about how to debug HTML and CSS, and you can take a look at:
    https://msdn.microsoft.com/en-us/library/ie/gg699337(v=vs.85).aspx
    Thanks,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Need to Auto generate bookmarks from MS Access

    I have a report that I can turn into a pdf but I can't get Adobe Acrobat to make bookmarks for me automatically.  The first field on the page I need for the bookmarks are uses a distinctive font, font size, and color.  I can manually make a bookmark for each page but I have over 90 bookmarks to make and it takes too long.  I need Acrobat to make the bookmarks but am having trouble.  Please tell me how I can do this efficiently.  Thanks.

    Hi,
    Adobe PDFMaker for MS Access permits creation of "Bookmarks".
    Open PDFMaker configuration to select it.
    With that said, the Bookmark (in the PDF) comes from the MS Access report title/caption.
    Unfortunately, Bookmarks associated with fields in a record are not supported.
    Be well...

  • Print out some numbers

    Hello:
    At the movement I got array nums[]={"1", "2", "3", "4", "5", "6", "7", "8"},
    Please tell me how to print out some numbers from the array by using for loop, and the result exactly like System.out.println( " 1 2 3 4 "); System.out.println(" 5 6 7 8);
    Please run my codeing first, I'd like the result exactly same as my coding showing.
    Thanks
    import java.awt.*;
    public class Test{
    private static Test t;
    private static String nums[]={"1", "2", "3", "4", "5", "6", "7","8"};
    public static void main(String [] args){
         t=new Test();
    private Test(){
         print();
    private void print(){
         System.out.println(" 1 2 3 4 ");
         System.out.println(" 5 6 7 8 ");
    }

    Ugh!
    I didn't see that you wanted 1,2,3,4 and 5,6,7,8 on new lines. This will do the trick. It's ugly but it works.
    public class Test
        private static Test t;
        private static String nums[] = {"1", "2", "3", "4", "5", "6", "7", "8"};
        public static void main( String[] args )
            new Test();
        private Test()
            print();
        private void print()
            for (int i = 0; i < nums.length; i++) {
                if (i == 4) {
                    // Print a Blank Line
                    System.out.println("");
                String num = nums;
    System.out.print(num + " ");
    cheers,
    Greg

  • Stripping out mail header photo

    Hi Folks,
    I assume others have run into this problem: MSN Windows Live Hotmail rejects your email, apparently because it considers the little account id photo that Mail inserts on the right side of the mail header as some kind of deadly Trojan Horse vector. Does any bright spark out there know how to strip out that photo in Mail (3.6)? I was hoping to get lucky with "Make Plain Text", but no joy. I've looked through every menu I could find and see no place to change that setting. Thanks in advance!

    That little picture isn't sent out with any of your outgoing mail; not in the header, not as an attachment, not by any other method. Apple's mail program just displays it there when you read the messages in your Sent box; it never leaves your computer. So the problem you are having with Hotmail must be because of something else.
    You might want to start a new thread here with a more detailed description of what the problem is. Put "Windows Live Hotmail" in the subject line , so users with experience and knowledge about that will be more likely to see it and give you a helpful response.

  • How to find whether PO is auto generated PO or not.

    Hi,
    How can we find the PO is Auto generated PO or Not in techinically.
    Appriciate quick response.
    Thanks & Regards,
    Surya Sankar

    Hi,
    You can check the following area.
    First check the T.code WE05 or BD87--> find the PO details if it has been created Automatically.
    Check in the BBP_PD and gets the details.
    Hope this will help you, award the points for the same.
    BR,
    Vijay Mittal

  • Auto Generate Inicdent by Email

    Hello,
    How can I configure service manager to auto generate an incident by sending email to it ?!
    and how service manager will recognize who will be the responsible for this incident to submit it to him ?

    1. You can use the
    Exchange Connector to generate incidents based on received email
    2. When receiveing the email you can apply a template. In this you can have a specific person or rather a support Group assigned to the incident. There is no inherent logic that can assign incident based on ex. email subject. For that you will have to employ
    Orchestrator or some PowerShell.
    Cheers,
    Anders Spælling
    Senior Consultant
    Blog:  
    Twitter:   LinkedIn:
    Please remember to 'Propose as answer' if you find a reply helpful

  • How do you strip out certain groups of characters from a String variable

    for exapmle...
    String date = "11-Feb-2005";
    String day;
    String month;
    String year;
    how would you strip out '11' from date to assign it to 'day', and 'Feb' to assign it to 'month' and '2005' to assign it to 'year'.
    in my program the variable 'date' will always be in the format of:
    ist two digits are numbers followed by '-'
    then three digits (letters) followed by '-'
    then four digits that are numbers.
    i think it has something got to do with charAt or something, im not sure how to do it.
    any ideas?

    yea i tried the first method and it works fine.
    thanks very much.
    also... i tried the other one and it outputs... 11 1 2005
    which means it works but you see i wanted to put the date in the format of...
    Calendar date = new GregorianCalendar(2005, Calendar.FEBRUARY, 11); so i can compare it to another Calender object to see which one is earlier.
    that is why i am doing it like this...
    Calendar date = new GregorianCalendar(+ year + ", Calendar." + month + ", " + day);
    for example...
    Calendar xmas = new GregorianCalendar(1998, Calendar.DECEMBER, 25);
    Calendar newyears = new GregorianCalendar(1999, Calendar.JANUARY, 1);
    // Determine which is earlier
    boolean b = xmas.after(newyears); // false
    b = xmas.before(newyears); // true
    anyways i am just curious.

  • HT4642 ios numbers:how to make cell height variable with auto line brake setting ?

    ipad numbers; How to make cell height variable with auto line break setting?

    That's strange. I responded earlier and the whole message got trashed. Hence the test post before retyping the entire thing again.
    Thanks for the reply.
    The video clip is a single screen capture video clip. This is what I've found by playing around with this more.
    The original clip resolution is greater than 640x480. If I use QT Pro to convert the original clip to 640x480 and then use either Flip4Mac or PE7, then the resolution looks good.
    Just trying to figure out if should keep all workflow on the MacOS side. There are several different version of Flip4Mac. $49 gives me 640x480, but if I ever want to make it slightly larger then I would need to go with the $99 or HD version.
    I also tried to export to AVI with QT Pro and the import with Windows MovieMaker but it didn't work really good. I liked the simplicity (since PE7 hogs a lot of resources especially through VMWare).

  • I had my iphone 4s synced to itunes on my work laptop. The IT group at work stripped out that installation and will not allow me to reinstall. My iphone insists it has to sync to my work laptop itunes. How do I change iphone settings to look at an itunes

    I had my iphone 4s synced to itunes on my work laptop. The IT group at work stripped out that installation and will not allow me to reinstall. My iphone insists it has to sync to my work laptop itunes. How do I change iphone settings to look at an itunes installation on my personal laptop?

    dcotejr wrote:
    I had my iphone 4s synced to itunes on my work laptop. ... How do I change iphone settings to look at an itunes installation on my personal laptop?
    You cannot.
    By Design the iPhone can Only Sync to One iTunes Library at a time.

  • How to find out the changes made to a photo in numbers rather than in graphs..

    How to find out the changes made to a photo in numbers rather than in graphs..

    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?"

  • How to find out the GR Numbers for which IR has not been done

    Hi Sap Gurus,
    Can anybody tell me how to find out the G R Numbers for which Invoice Receipt has not been done. Any TC or ant standard process to find out.
    Thanks N Regards,
    Siddhartha

    Hi Siddarth,
    Solution :
            1) Go to SE16 - Table Name : EKBE (PO History)
            2) Field - BUDAT (Posting Date)
            3) Transaction event Type:
                             - 1 (Only GR's )
                             - 2 (Both GR and IR)
            4) We can fetch both GR Numbers and also PO Numbers for which IR has not been done if transaction event - 1.
    In addition to MB5S, you can try this also...

  • I just upgraded to the latest software for my pages.  When I opened an old document it stripped out all the images I had in my tables.  How do I get them back

    I just upgraded to the latest software for my pages.  When I opened an old document it stripped out all the images I had in my tables.  How do I get them back

    Don't save. Close the documents.
    Pages '09 should still be in your Applications/iWork folder.
    Pages 5 will damage/alter older files, something Apple didn't tell its users.
    Pages 5 is a severely stripped down version with over 90+ features removed.
    We recommend trashing/archiving Pages 5 after Exporting any files you may have saved back to Pages '09.
    Also rate/review Pages 5 in the App store.
    Peter

  • How to strip HTML out of the form field but leave the basic user formatting?

    What would you recommend to automatically strip out HTML that a user has entered into a form field? At the same time we need to preserve the basic formatting that was submitted by the users  i.e. replace <p> tags with CRLF, etc. StripHTML function is perfect but it removes all HTML and therefore, all formatting. Is there anything more flexible?
    Thanks!

    Do you need to strip it, or just render it inoperable.
    The latter can be done with the htmlEditFormat() and htmlCodeFormat() functions.
    If you want the striping, take a look at related functions at the http://www.cflib.org site.   I know I have seen HTML replace functions that had the ability to be configured to strip and|or not strip a select list of tags.
    StripHTML() may actually have this feature (I believe it is hosted at cflib.org).  You may just need to see the documentation on how to configure it thus.

Maybe you are looking for

  • Best iTunes strategy for a family with multiple Windows accounts

    On our previous Windows 7 PC, I set up separate Windows accounts for each of our family members. Since iTunes can't be run concurrently on more than one Windows account, I also set up another Windows account named "iTunes," the sole purpose of which

  • One of the podcasts on my computer won't synch to my iPhone 3GS

    I'm trying to sync a podcast from my Windows 7 HP laptop to my iPhone 3GS, which is running ios6. The podcast in question is called "A Short History of Japan" by Cameron Foster.  It currently consists of 29 episodes.  The problem was, the first 12 ep

  • Can't get click event to load from ImageButton

    *Newbie Alert* I am trying to create dynamic image buttons that when clicked will redirect to anothr page as well as add a new item to a SharePoint list. My Image buttons create sucessfully but the click event is not loaded. I have added a break poin

  • Photo sharing in Photos for mac

    I suspect I know the answer to these questions but I thought it was worth asking, as any improvement in the way I sort my photos would help - I seem to go round in circles a bit!!! - Because my photo library is bigger than my iCloud allowance (I have

  • How do you change the Help title/ version number?

    Hi, When I view the primary layout, after generating it, I see a tab at the upper left, like a tab on a file folder.  It says v4.0 Online Help, but I want to update this to v4.1.  Could you tell me how to update it? Thanks, Erin