Listing Bookmark Script Align Page Numbers to Right

Hello,
I have a script which will list Bookmark Names and then the Page Number after the bookmark as follows:
Bill Smith  Page#1
Jeffrey Jones  Page#5
Christopher James  Page#8
What I would like the script to achieve is to list the bookmarks and then align the Page numbers to the right side of the pdf instead of jumbled together.
Can anyone please advise if it is possible to do this in javascript?
The existing code is as follows:
/* List all Bookmarks */
/* Recursively work through bookmark tree  */
function PrintBookmarks(bm, nLevel)
    if (nLevel != 0) { // don't print the root
        bmReport.absIndent=bmTab*(nLevel-1);
bm.execute();
            bmReport.writeText(" "+bm.name +" Page "+(bm.doc.pageNum +1));
    if (bm.children != null)
          for (var i = 0; i < bm.children.length; i++)
            PrintBookmarks(bm.children[i], nLevel + 1);                          
bmTab = 20;
bmReport = new Report();
bmReport.size = 2;
bmReport.writeText(this.title);
bmReport.writeText(" ");
bmReport.size = 1.5;
bmReport.writeText("Listing of Bookmarks");
bmReport.writeText(" ");
bmReport.size = 1;
PrintBookmarks(this.bookmarkRoot, 0);
global.bmRep = bmReport;  // make global
global.wrtDoc = app.setInterval(
    'try {'
    +'       reportDoc = global.bmRep.open("Listing of Bookmarks");'
    +'       console.println("Executed Report.open");'
    +'       app.clearInterval(global.wrtDoc);'
    +'       delete global.wrtDoc;'
    +'       console.println("Executed App.clearInterval");'
    +'       reportDoc.info.title = "Bookmark Listings";'
    +'       reportDoc.info.Author = "List Bookmark Sequence";'
    +'} catch (e) {console.println("Waiting...: " + e);}'
    , 100);
Any help will be much appreciated

Thank you very much for your help.
I have modified the script to have the bookmarks and page numbers on separate lines, however the indent does not go further than the middle of the page on the seconde line for the page numbers, no matter how much the indent is modifed  (I am also using version 8 of Adobe).
Can you please advise how to get the indent to increment past the middle of the page to the right side of the page?
The script which has been modified is as follows:
/* List all Bookmarks first then Page Numbers */
/* Recursively work through bookmark tree  */
function PrintBookmarks(bm, nLevel)
    if (nLevel != 0) { // don't print the root
       bmReport.absIndent=bmTab*(nLevel-1);
bm.execute();
            bmReport.writeText(" "+bm.name);
bmReport.absIndent=(580);
bmReport.writeText(" Page "+(bm.doc.pageNum +1));
    if (bm.children != null)
          for (var i = 0; i < bm.children.length; i++)
            PrintBookmarks(bm.children[i], nLevel + 1);                          
bmTab = 20;
bmReport = new Report();
bmReport.size = 2;
bmReport.writeText(this.title);
bmReport.writeText(" ");
bmReport.size = 1.5;
bmReport.writeText("Listing of Bookmarks");
bmReport.writeText(" ");
bmReport.size = 1;
PrintBookmarks(this.bookmarkRoot, 0);
global.bmRep = bmReport;  // make global
global.wrtDoc = app.setInterval(
    'try {'
    +'       reportDoc = global.bmRep.open("Listing of Bookmarks");'
    +'       console.println("Executed Report.open");'
    +'       app.clearInterval(global.wrtDoc);'
    +'       delete global.wrtDoc;'
    +'       console.println("Executed App.clearInterval");'
    +'       reportDoc.info.title = "Bookmark Listings";'
    +'       reportDoc.info.Author = "List Bookmark Sequence";'
    +'} catch (e) {console.println("Waiting...: " + e);}'
    , 100);

Similar Messages

  • Right align page numbers that are to the left of TOC entries

    I posted a similar question about a year ago that I believe Harbs or Peter answered, but darned if I can find the thread. At that time they provided a script that did a GREP search, finding a sentence that starts with a digit and replacing it with a tab. I still have the script, but for some reason it is not working correctly with my new TOC layout.It should insert a tab to the left of the page number (page numbers are to the left of the TOC entries), and force the numbers to right align so that a single digit page number right aligns with the right edge of a double-digit page number.
    Find: ^(\d+)
    Change to: \t$1
    What happens in the new TOC is the script finds a digit and inserts a tab to the left of the page number. The page numbers move to the right, but they don't right align. They are further to the right, but they numbers themselves are still left aligned.
    I'm mystified as to why the script doesn't work on this new layout. I'm using CS4 now, and it still works on the old layout. There is nothing terribly different about the new layout except that the column is much narrower, and there are several threaded colums in the TOC instead of one long column, and the chapter titles don't have page numbers (but all other entries do have page numbers.)

    Peter,
    Thanks for your reply. Between the page number and the entry is an en-space.
    I started with these settings:
    I then changed the left aligned tab to a right aligned tab:
    But still no luck.

  • How to produce a list of URLs and page numbers from large website pdf file.

    Adobe Acrobat Pro version 10.1.4.
    I created a pdf file from an entire website which has 1062 pages.
    I was asked to produce a list of pages which should be updated or deleted.
    There is a URL on every page.
    What is the best way to mark the pages for update/deletion?
    Is there a way to automatically produce/export a list of a all URLs of these pages including page numbers and "feature" update/delete? Thanks for your help.

    Thanks for the reply. I refer to the page numbers visible under the pages when you click on in the icon "Page Thumbnails" on the top left side. The page numbers do not appear on the pages themselves.
    When saving the entire website bookmarks were created automatically as as well as the URL put on the left botton side of the respective page. They have always the same syntax like this: http://egr.istat.it/?q=node/285[06/062013 17:54:35]

  • Right align all numbers in table of contents

    One of the entries in my table of contents has the page number right beside the entry. The rest of the page numbers are right aligned.
    When I "Show Invisibles", an arrow is in the single space between the entry and the page number. For the remaining entries, it is in the middle of the page.
    I've tried redoing the heading on the page in question about 100 times. I cannot figure out what is different about that heading that is screwing the ToC up.
    Thanks.

    Hey
    I'm really struggling with my pages as I have created a table of contents for iWork09 but it's defaulted for the pages numbers to sit directly after the chapter rather than face the opposing side like your picture shows. I tried changing the tabs and then the text layout from left to across the page but all it does it push the numbering to the next line (for the longer titles) and push the numbers across (for the shorter named titles). I can't even get the lines to appear so that the chapter title appears, then some dots leading to the number. Any ideas?

  • Bookmarks and page numbers

    How do l install page numbers and bookmarks to my documents?
    Thanks

    Reader says it all.
    With Acrobat you can add bookmarks and logical page numbers.

  • HP DeskJet 3510 Printer Alignment Page Doesn't print correctly.

    Hi I have a strange problem with my HP DeskJet 3510. I took it out of the box installed everything loaded up paper and powered it on. It went through all the motions and blah blah and printed out an alignment page. Anyhow it didn't look right to me but I went ahead and scanned it anyway and it then said "ink cartidges are set to default color quality" or something to the effect. I hit ok and it went to the main menu.
    Now from my wifes phone I can connect to the printer and print just fine but from our laptop the alignment is all jacked up. If I type a bunch of random lines into notepad or anything really it misses a bunch of lines and some lines just don't even appear. Which I could only think would be because the alignment page isn't right.
    Also from app that gets installed from the software CD on the laptop I can choose to align the cartridges but when I do and it prints and I scan the page (that still looks jacked up to me) the software tells me the alignment failed and asks me to rescan after I put the page in there right. I know the page is in there right its face down and in the bottom right hand corner as it should be.
    Now I have ran the cartdridge cleaning process several times took the cartridges out and looked for debris or anything that could be in the way even though I doubt its any of those things becuase like I had said earlier it prings perfectly from my wifes printershare app from her smart phone. Just as it appears on her screen. Only getting this issue from the PC.
    Anyhow I am going to attach a photo of how the priner aligment page comes out from me doing it on the printers control panel and from the PC's software both it comes out looking like this. If you could please give me some advice to what to do next that would be great as I am out of ideas. Did I just get a bad cartridge? If so why would it print from my wifes phone fine and not from the PC? Is this how the alignment page should look (can't read any of the things on the lower portion really).
    Other Info : PC is running Windows . Other PC has same problem running Windows XP. Wifes Phone is using PrinterShare app. Any information or helpful advice is appreciated thank you guys in advance.

    Finally, after installing and uninstalling the print cartridges on my HP-3510 around 10 times; I finally got the alignment page to print and then scan successfully. It's a nice, very economical printer when it works properly. I was on the verge of tossing it but glad I didn't. I guess the lesson is that persistence can pay off. My thanks to the other two contributing posters.

  • Missing page numbers while generating PDF from Framemaker book

    FrameMaker 9 book files have the correct master page applied and page numbers appear right. However, when generating PDF, the page numbers including the footer is missing.
    I created another book file, yet same issue occurs.
    Also, tried generating separate PDF for each chapter, same issue occurs.
    I have installed Univers font from ATM, I'm using WIndows XP. The Footer tags are in Univers font. Could that be the reason?
    Please advise.

    Error7103 wrote:
    We have seen a similar problem when the page# was at the right edge of the header or footer frame, and the tab that put it there was too far to the right.
    This is an old problem. It comes from setting tab stop positions in paragraph formats with the cursor in the text frame on the TOC reference page. Nothing wrong with this, EXCEPT when the master page text frame has been made narrower than the reference page's text frame. One way to avoid the problem or to fix it, is to set tab stops in a paragraph in the body page text frame, so the width is correct. Another way is to set the tab stops accurately by number, rather than by eye. Visually, the reference page tab stop will look correct, but the generated TOC uses the master page text frame - if it's narrower than the reference frame, this problem occurs.
    I seem to remember that this might have been fixed in more recent FM releases, but I think that's a false recovered memory, because this is not a bug, just a discrepancy in measurement. There's no way to expect that the prototype paragraph format on the TOC reference page can know if a tab stop will be out-of-bounds on the generated TOC page.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Page Numbering Issues

    Hi,
    I have almost completed my first document using Indesign 4.0.5. I am obviously new to the software and am having trouble understanding how the page numbering works. (I did a search on page numbering in the forum and nothing came up - could be something up with the search.)
    My document is an 8.5"x11" brochure with 18 pages. I would like to begin the page numbers after the table of contents page or at least have these as visible page numbers starting at page 1. I am using absolute page numbering and have created a master spread with page numbers. Right now my page 1 is cover, page 2 is back of cover, page 3 is TOC page, page 4 is beginning of document. How can I make page 4 show page 1 and have the following pages update as page 2, 3, 4, etc.?
    Sorry for the elementary question.
    Rob
    Adobe CS2 Standard
    Windows XP Pro
    4GB RAM

    >I realize that means page 1 will now be on the left which is not typical but without adding an additional page or calling the TOC page 1 there is no way around that.
    If you can't rearrange the prelims, adding a blank verso page is the standard fix. Having the rectos even will be seen by most people as your error.
    >I always thought that one should start page 1 after the TOC but I am seeing more documents of this size starting page one on the cover (not visible) and the TOC page being page 3.
    I suspect it's the result of more and more people with no knowledge of typography and book design "setting" their own books simply because they think that five minutes playing with a DTP app (or even Word) makes them just as good as those who spent years learning the trade. Covers traditionally were not numbered, and the prelims were numbered with roman numerals. This protects you from having to renumber the whole book if your TOC or other preliminary matter ends up taking up more room than you had estimated. And the prelims don't automatically end with the TOC - each publication has to be treated individually.

  • Adding page numbering through a script.

    Hello forum members,
    I am having a hard time to add page numbers on actual pdf pages.
    Here is what I have:
    - Adobe Acrobat Prof. 7.0 and Win XP.
    - ca. 200 PDF files with pages that should be continuously numbered without putting them into one big pdf-file. Instead, the pdf files should stay individual files even after numbering.
    Here is what I can do:
    I wrote a javascript (in the batch section) that numbers all the thumbnails in the files. It works fine. But I cannot find the right command to add the page numbers on the individual pdf-"pages". Can you pls. point me in the direction I have to look for? Do I have to add a watermark at the position I want the numbering to appear or do I miss something obvious? Thanks in advance.
    Greetings,
    dirk

    Hello forum members,
    thank you very much for your replies, thanks to your help it works now!
    I just had to change one more property:
    myField.readonly = true;
    which makes the field not user selectable. (Just for other people, who may look for a solution to the same problem.)
    Many regards and have a nice day!
    dirk
    I post the complete solution here:
    /* Script to number your pages */
    this.setPageLabels(0, ["D", "Page-", global.my_count]);
    var name;
    var page;
    var myField;
    var type = "text";
    var location = [272, 40, 310, 20];
    for ( var i = 0; i < this.numPages; i++ ) {
    name = "Page " + i;
    page = i;
    myField = this.addField( name, type, page, location );
    myField.delay = true; // delay updating in JavaScript
    myField.alignment = "center";
    myField.borderStyle = border.s;
    myField.textSize = 8; // auto sized
    myField.fillColor = color.transparent;
    myField.strokeColor = color.transparent;
    myField.textColor = color.black;
    myField.textFont = font.Times;
    myField.value = global.my_count + i; // page number adjustment
    myField.readonly = true;
    myField.delay = false; // restore updating
    global.my_count = global.my_count + numPages;

  • The list of open web pages just flipped from right to left. How do I get it back on the right? Thankyou.

    The list of open web pages, which normally sits bottom right on my screen, flipped to the left. How can I move it back to the right?
    I clicked Alt + tab and saw 'Deplacer' (Reposition - I'm in France). Then the cursor became a thing like a crossroads and I clicked where I wanted to put the list of open pages but nothing happened.

    You may have placed the bookmarks icon on the Navigation Toolbar to open the bookmarks in the sidebar instead of the bookmarks menu button that opens a drop down list.<br />
    There are two icons available for opening or accessing the bookmarks that both have a star.<br />
    The icon with the drop marker opens the drop down list with the bookmarks (Bookmarks Menu button).<br />
    The other, without the star, opens the bookmarks in the sidebar, just like the Ctrl+B shortcut or View > Sidebar > Bookmarks
    See:
    *https://support.mozilla.org/kb/Back+and+forward+or+other+toolbar+items+are+missing
    *http://kb.mozillazine.org/Toolbar_customization

  • ITunes Store Apps (etc) Page Numbers, Wish List For My iTunes Account

    Why doesn't the iTunes Store have page numbers under each page of the items (songs, e-books, apps, etc), because with over 200000 apps I will be damned if I am going to go back to the start of each apps category (for example) clicking in increments of 12 apps at a time until I get to app number 7264!!!!!! I WILL JUST STOP USING THE APPS STORE!!!
    Some apps have a PRODUCTIVITY button in the left top corner that will take you back to the last apps browsing page you were on, while other apps have a BACK button in the top left corner WHICH TAKES YOU RIGHT BACK TO THE FIRST PAGE OF THE APPS CATEGORY YOU WERE BROWSING, so if you were up to app 734 (for example) you have to click through 64 apps pages JUST TO GET BACK TO THE APP YOU WERE UP TO LAST!!! INFURIATING - BEGGARS BELIEF!?!
    WHY CANT I CLICK AN 'ADD TO WISH LIST' BUTTON ON EACH APP PAGE, SO I ALSO DONT HAVE TO BROWSE THROUGH ANOTHER 100 PAGES OF APPS TO FIND THE ONE I LOOKED AT IN MY LAST ISTORE SESSION??????
    Hasn't anyone at apple used eBay or amazon???
         

    Update: As of this morning the updates were GONE again, so I'm thinking this may recur on and off until all settles after the launch of new software and iDevices this week.

  • In pages(not the New version) footer is over to the left, so when i put the page numbers in they don't sit right. How do i move the footer

    In pages(not the New version) footer is over to the left, so when i put the page numbers in they don't sit right. How do i move the footer

    The footer is not only to the left. To get the page number to the right you can use Format > Align right. That will make all page numbers move to the right. Is that what you want?

  • Non-English page numbers/lists

    Hello.
    I have ID CS4. I am working on a doc that needs non-English (Latin) numbers as the page numbers. The doc has about 2,500 pages, and I do not want to do this manually. I have looked all over the place for a solution and have found nothing even romotely close. Anyone have an idea how to do this? Thanks.
    Adam

    Well, when I've needed to do page numbering using Khmer numerals, or Burmese, or Lao, or etc., I have only used workarounds. (One of 'em is actually a workaround I originally learned from Peter that he mentioned, which I will describe in a bit more detail) They're all bad. A script might be a better idea, but I suggest that you submit a feature request, as will I, because I'm hoping for decent international support by CS8 or so.
    1) Use a bad font! You know, like Limon, or some other font that has Khmer numerals mapped onto the Arabic numeral codepoints. That way you can use a page number placeholder on the master page.
    2) Your number-list idea is a good one, but InDesign can't just use your number list. What I did was this:
       a) Make a list of 300 Burmese numbers in raw text
       b) Set up the margins so that the "main text area" was where I wanted my page numbers
       c) Make sure that Layout -> Layout Adjustment is off (this is necessary for step e. below)
       d) Place the number text file, holding down shift so it auto-flows
       e) Change your margins back to your desired settings - the number-containing text boxes should remain where they are
    3) Edit a font to put your preferred numeral system. Ugh. I did this for a client, once, in 2007, and I still feel dirty.
    4) Feature request to Harbs for more numbering options in World Tools - I haven't tried this one yet but I bet it's your only chance to get Khmer numbering before CS8.
    Proof that no. 3 must be doable in one way or another... here's English ID's options in numbering formats:
    and in World Tools (CS4)
    ... so it must be possible. I have found Adobe to be about as responsive as a hunk of marble when asking for properly-implemented multilingual support. Asking Harbs if the numeral options in World Tools can be expanded to include SE Asian script(s) might be your best bet.
    As a side note: I know that it's useless, but I can't stop telling people what number systems are actually called.
    1 2 3 4 5: Arabic numerals
    ١ ٢ ٣ ٤ ٥: Hindi numerals
    I II III IV V: Roman numerals
    sorry, I'll get off my soapbox now.

  • How do I Right-align TOC numbers if they're not

    Hello, i'm talking from Italy.
    I've a little question about TOC.
    I wrote my thesis for my degree, placing the TOC at page 5. Since this... no problems.
    Right now i finished writing and wanted to update the TOC. But... surprise... the page numbers doesn't right align as i would!!!
    I'd like to have this,
    | Title ...................1 |
    | Subtitle............2 |
    | Subtitle............6 |
    | Title..................19 |
    | Subtitle..........22 |
    ( Even without dots if it's not possible. The numbers should be aligned but here you can't see this. )
    But... i have this!!!
    | Title 1 |
    | Subtitle2 |
    | Subtitle6 |
    | Title19 |
    | Subtitle22 |
    it's such a DISASTER!
    Can i solve this problem? My university requires page numbers.
    Thank you.
    Message was edited by: giggionline

    Select the TOC by clicking in it. It will help you if you have Show invisibles on.
    Now you can align the number by pulling the small blue triangle on the ruler.
    !http://img686.imageshack.us/img686/7861/tocp.jpg!
    Now open the Inspector > T tab > Tabs > click on Leader button> choose leader

  • Right-align footnote numbers

    Is there a way to right-align footnote numbers so that they will align like this:
      1. Text of footnote
    12. Text of footnote
    123. Text of footnote
    instead of like this (an abomination):
    1.   Text of footnote
    12.  Text of footnote
    123. Text of footnote
    The obvious way would seem to be to add a tab as prefix (in Document Footnote Options|Numbering and Formatting) and set the tab as right-aligned in the paragaph style, but the dialog will not accept a tab (^t).
    I can't see any way to set the alignment in the para style options either.
    At the moment I use three paragraph styles Fn #, Fn ## and Fn ### with varying indents, but it’s cumbersome and unreliable having to reassign styles when footnotes are added or deleted.

    In 2006-2007 I converted 32 publications from Ventura to InDesign. From 200 pages to 3,200 pages. I feel your pain. Ventura was a crazy program. I was updating things in Ventura. I'd save it and go home and then the next day half the book (not the changes just literally half the text from the book) had disappeared. Gone. So frustrating.
    Regarding indexing:
    We outsourced our indexing to an indexer, we just gave him/her a pdf of the book and we a got an index back.
    Similar to yourself, it has cases and statutes in all the books. So I've never really used the indexing feature, I have ledt that to a pro indexer. Hopefully someone else can you point you on that.
    But if you need any more help converting from Ventura to InDesign let me know. I did a lot of automating of the books, chapter numbers, pages, numbered paragraphs, TOCs etc.
    My proudest moment was using GREP to apply styles to the 3,200 page book. I opened all the chapters and applied master pages with variables for running heads (as they changed each page (cs3 came along just at the right time ). I then proceeded to GREP find and replace millions of text across literally thousands of pages. I applied all the styles to all the text in the right places in 2 days. It then took me 2 weeks to proofread my new document. Which had a few hic-ups but sorted quite easily.
    So hopefully my little success story will inspire you some how.

Maybe you are looking for