How do the pages alphabetically to indesign cs4?

I have a box of text at the beginning of each page and I want the pages in alphabetical order based on this text box. Do you know how?

This will do.

But see also http://forums.adobe.com/thread/1082984?tstart=0 for a better workflow.

For some reason the OP there didn't come back to say thank you and mark the answer as being correct.

Trevor

// Script to sort Pages according to alphabetical order of their top TextFrames contents
// by Trevor (www.creative-scripts.com [coming soon]) custom and readymade scripts for InDesign
// http://forums.adobe.com/thread/1405293?tstart=0
// see also http://forums.adobe.com/thread/1082984?tstart=0 for a better workflow

app.doScript("aToZPageSort()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Sort Pages By top text contents");
function aToZPageSort () {
    var doc =  app.documents[0],
          myPageIndex = [],
          l = doc.pages.length,
          topFrameIndex = z= 0, pageFramesTops, i, topFrameHeight, topFrame;
    while (l--) {
        pageFramesTops = doc.pages[l].textFrames.everyItem().getElements().slice(0);
        n = i = pageFramesTops && pageFramesTops.length;
        if (!i) continue;
        while (n--) pageFramesTops[n] = pageFramesTops[n].geometricBounds[0]; // for some reason when one trys to get the geometricBounds[0] from teh everyItems without the elements it return y1, x1 and not just y1 ?-)
        topFrameHeight = pageFramesTops[0];
        topFrame = doc.pages[l].textFrames[0];
        for (var n = 0; n< i ; n ++) {
            if (pageFramesTops[n] < topFrameHeight) {
                topFrameHeight = pageFramesTops[n];
                topFrame = doc.pages[l].textFrames[n];
            }
        }
        myPageIndex [z++] = {page: topFrame.parentPage, contents: topFrame.contents.toLowerCase()}
    }
    myPageIndex.sort (function (a,b) {return (a.contents.toLowerCase() > b.contents.toLowerCase())});

    l = myPageIndex.length;
    while (l--) myPageIndex[l].page.move (LocationOptions.AT_BEGINNING);
}

Tags: InDesign

Similar Questions

  • Normally, when you open the page palette in InDesign, it is divided into two. The upper part is where is the master page (and a page named none), while the lower part is where are the actual pages of documents. Unfortunately, when I opened my palette of p

    Normally, when you open the page palette in InDesign, it is divided into two. The upper part is where is the master page (and a page named none), while the lower part is where are the actual pages of documents. Unfortunately when I opened my palette (InDesign CS 6 on a Mac), there is no upper and lower part of the page-only the lower part is displayed. When I put my cursor on my pages, it tells me that I "Applied A-master".

    Why not my top shows (A-master and none)? The pages that I don't "Act" like master pages - for example, I can't get past page numbering.


    Any help is appreciated. Thank you!

    It looks like the upper part may be in a State reduced - the line was pulled up.

    Just of the cursor on the line that separates the upper and lower sections, and drag it to the bottom.

  • How can I get the smallest pdf from InDesign CS4, but keep some sharpness?

    I have a brochure of 2 pages, front and back with layered photoshop files, and when I do the small pdf, I need to make a file of 100kb as a customer has done in the past. The smallest, I can do the PDF is 460kb.  He'll be no smaller, no matter what I do. Of course I can enter final resolution as 72 dpi, but photos are very blurred. I have even reduced the size of the files of the photos and replaced in the document. The size of the file remains the same.  My client said that reduced Illustrator for him plus size small in the past but I don't think it's the solution.  How can I you keep some sharpness in a pdf file but keep the size of the file to a bare minimum?

    But InDesign CS4 out the file no matter what happens to 460 k for me.

    Still don't know why they got 100 KB.

    By not using not InDesign. Scott is on the right track by mentioning Distiller - what makes PDF files which is smaller than InDesign can export. Illustrator can be used (bad *) in the same way. Both methods can remove stuff that you don't need if you don't care the print quality don't care about reliable display on multiple platforms, don't care exactly how your fonts are included, don't care about the trial that blind people using screen readers will sue you and so on. I don't know what above is not in your customer file 100 k, or that things in my list above will be eliminated out using Distiller or Illustrator, but I bet that one of the people that has already been posted in your thread is known and can be talked about telling us.

    But, if you try to make your customers happy and are not actually personally invested to make the smaller PDF files known to man, and if you are located in the United States, then maybe the phrases "blind screen... readers accessibility... trial" spoken together could encourage your client to rethink this arbitrary will of tiny size of PDF files.

    Alternatively, you can just save postscript on the two PDF files and just watch the .ps files in your favorite plain text viewer.

    * I'm surprised that Adobe employee Dov Isaacs did not come tell us what it is a bad idea.

  • How to create 3 pages in adobe indesign cs4

    Hello.  Is there a way you can create 3 pages in indesign.  IM creating a 6pp A4 brochure and my graphics, cross the three pages. Can I create a 3 page double or will I need to create a document of 630 m wide?  Thank you

    Create 6pp doc with pages in the face.

    In the box on the top of the pages Panel, uncheck the box "allow the selected spread to shuffle ' and drag the small icons where you want in the pages Panel.

    PS... Check 'allow pages Shuffle' if not already done.

  • Batch to change the page size of InDesign documents

    I have about 300 documents in InDesign (2014 cc, Mavericks) a page of various page sizes. Each page is wider than 4 inches and 4 inches larger than the content of the page. The content is in middle of the page - actually make a margin of 2 inches (but with no margin guides) around the content. What I need to do, is get the page of all documents will have to be a specific page size, 7,125 "x 9.75".

    I was able to accomplish this by putting all the docs in a book, make a master page 7,125 "x 9.75" on a doc, synchronize the other docs and then opening each doc and apply the master page. The last piece was a bit a lot of work and I would like to avoid it in the future.

    Could write a script that opens some InDesign documents (in or not in a book) and changes the various sizes of page to the necessary size? I've never written scripts before, so no idea if it's possible or how to do it.

    I put the following on another forum and got help, but it took that I have control over the creation of the original documentation. And I did not. "Is there a way to globally apply a master page to all pages of all documents in a book?

    Any help is greatly appreciated.

    Hello

    What is your requirement

    var myFolder = Folder.selectDialog("Select the Folder contains Indesign Files")
    
    var myFiles = myFolder.getFiles("*.indd")
    
    alert("Total Indesign Files: " + myFiles.length)
    
    for(i=0; i
    

    Concerning

    Siraj

  • How to set page by propagation in CS4?

    I have trouble finding how to set page by propagation using the Smart Text Reflow in CS4.  Help, please.  Thank you.

    I don't use Smart Text Reflow, so I don't know about you, but I expect NOT to get a gap of two page EVER in a page EXCEPT document non-connected to shuffle is turned off for broadcast or the document as a whole.

  • Use of the spell checker crashes InDesign CS4

    Hello

    Have installed InDesign CS4 and updated to 6.0.3

    But whenever I try to check the spelling in any document or access the dictionary in file > Prefs, InDesign crashes.

    Have done all the usual checks, repair disk permissions, set cell former InDesign Prefs file, then recreated fresh file, not identified any conflict in the Console, run as an Application only on Mac InDesign. I have no third-party plug-in in the plug in folder, set up the default printer in the Print Center, logged on as another user who has administrator privileges, troubleshooted all my fonts, defragged the hard drive and checked all hardware.

    Still InDesign crashes when you try to access the dictionary in file > Prefs, or simply to check spelling Edit > check spelling in all - new or previously created document.

    In fact the first time check I'm using spelling (Edit > check spelling) in a document, the spelling will appear, but with a US instead of a British spellcheck, I can't change that in file > because InDesign Prefs, it blocks.

    Then if I try to check spelling Edition > check spelling a second wheel rotation, the time appears and bang - crash repeatedly.

    InDesign CS4 6.0.3 Mac OS 10.5.7 running on a Mac Pro 2.8 GHz Quad Core Intel Xeon with 2 GB of RAM, ATI Radeon HD 2600XT.

    The CS3 clean script would be a mistake, I think. There is a version of CS4, but which would remove the other CS4 applications as well.

    Being a Windows user, I'm not well versed in all potential problems in OS X, but this kind of accident is sometimes related to fonts. You have any kind of font utility, you can run to check for damaged fonts? You use a font manager?

    What about the other third-party plugins? You must disable ALL the non Adobe plugins and test again. Alternatively, you can rename the folder to SING, even if problems that have generally crash at startup, I think.

    Have you tried to create a new account clean and stable in this? What permission repair, Disk Warrior and other typical functions of Mac maintenance?

    Peter

  • problem with the color swatches in Indesign CS4

    Color PMS InDesign CS4 samples: when I try to create a new grade of PMS, I get only Pantone process numbers

    Yes

  • How can I get rid of the text box in InDesign CS4?

    For some reason, I can't get rid of the surrounding area of my text, how can I get rid of this? The text is also a link so...

    Thanks in advance...

    Open hyperlink Panel, double-click your hyperlink under URL field. Set your appearance of hyperlink´s the form of Rectangle Invisible...

  • How to add a line in Indesign CS4

    In Indesign 2.0, add that a line is Document.Lines.add

    But in CS4, there is no method of Lines.Add,

    So, how do you add a line in ID CS4?

    FlexMitchell wrote:

    In Indesign 2.0, add that a line is Document.Lines.add

    But in CS4, there is no method of Lines.Add,

    So, how do you add a line in ID CS4?

    In InDesign 2.0 . Lines collection was for graphic lines and . TextLines for lines of text. ID CS1 everything was changed - . GraphicLines has information about the graphic lines and . Lines collection contains information on lines of text.

    Robin

    www.adobescripts.com

  • How to print "selected objects" in InDesign CS4?

    I have a great calendar in ID CS4. I want to print and display some of the text in its actual size. My printer can print A4. How to print only the objects in its real size in this application and selected texts?

    Copy and paste the text into another A4 size document (IDCS4) would do it, but there is no native support "print selection" but Microsoft ' Word' has. "

    I see not layers much help if the problem is that the printer does not have a large enough sheet, but it can be: http://indesignsecrets.com/free-layout-zones-add-on-is-incredible-productivity-tool.php

  • Change the width of the rectangle, based on the page number in InDesign via Javascript

    I have a rectangle called "pageBar" on my master page!

    I would like to create a script that automatically resizes the width of the rectangle based on the number of page.

    Something like: "width = 1280 * (PageNumber / pageTotal)" "

    Any help would be appreciated.

    Thanks in advance,

    J.

    Hi Trevor,

    I did it like this...

    var myDocument = app.activeDocument,
    myPages = myDocument.pages,
    totalPages = myPages.length,
    currentPage = 1;
    
    function getPercent(a) {
        b = (a / totalPages);
        return b;
    }
    
    for (var i=0,l=myPages.length; i
    

    Thanks for your comments.

  • How do the page where I can download an ibook?

    Hello.

    I'm new here. I have an ibook ready to go, but I can't find a way to do it. Where should I start? Thank you.

    You already have everything you need in the FAQ?

    http://www.Apple.com/iTunes/working-iTunes/sell-content/books/book-FAQ.html

    Have you created your book using the application iBooks author?

  • How to place an image inline with the text using InDesign CS4?

    I'm writing the first draft of an instruction manual how two for some software.

    I'm writing the manual directly in InDesign CS4 and making screen shots that I'm making progress. I format the screenshot in Photoshop and export it to a JPG file.

    In InDesign, I double-click in the text box where I want to insert the image, go to file > place, get the picture, then press on open.

    Usually InDesign inserts the image at the cursor flashing in the text, but sometimes what happens is that no picture inserted and everything after it disappears. I get several empty text boxes and need to Control-Z to get back to where I started.

    Now I can put the image outside the text box and then manually move it to the text where I want to go, however when I export the file as HTML, then I need to manually move it to the appropriate area in Dreamweaver (when the image is placed inside the text box to the flashing cursor, the HTML file shows the image in the right place).

    I was able to insert the line in file with the text to a new paragraph mark, but sometimes InDesign doesn't let me do. Sometimes it does, sometimes it doesn't.

    I don't know what I'm doing to prevent it from placing the paragraph mark and the blinking cursor (which is where I want it to appear).

    This is a recording of screen 54sec of my actions:

    http://storytechnician.com/temp/idcs4-place/

    Steps to follow:

    I double-click inside the text box

    I place the image

    everything goes

    I have a few pages scroll, and then return to the starting point

    I have to scroll through a page or double-click inside the text box then press return a few times, and the previous image, I put in this way is automatically pushed to the next page.

    I go back to point of original departure, try again, and it does not work.

    I've done it before, but now it does not work. I don't know what's happened prevents him from online to the location of the cursor.

    Help, please.

    Thank you

    It seems to me that the image is too wide for the frame. You can place it on the editing table, scale in the size, then cut to the Clipboard and paste it into the flow of the text.

  • I want to update to 14 items. Download was successful. Purchase a key failed. I'm being transferred to a page named JRun Servlet error. On the page: 413 - length of the header too big how can I buy a key?

    How do the page where I can buy a key of 14 elements?

    Use a different browser or clear your adobe.com cookies.

    then try again.

Maybe you are looking for

  • T430s card reader cannot read the SDHC 16 GB card

    My t430s cannot read 16 GB SDHC card that I use in my camera. Card is formatted in FAT32. Additional audit, the ricoh card reader, that I tried to put a 4 GB SDHC card and he was able to read, so I guess it's a driver issue I would be solved since th

  • Error 1953 VCRedist 2008 X 64 installation on windows Vista [SP1]

    The application event log: Product: Microsoft Visual C++ 2008 Redistributable - x 64 9.0.21022 - Error 1935.An error occurred during the installation of assembly ' Microsoft.VC90.ATL, version = "9.0.21022.8", publicKeyToken = "1fc8b3b9a1e18e3b", proc

  • F340 HP all-in-one printer fatal error during installation

    I got my F340 all-in-one printer for a while and it worked great.  Last week I had some problems with her answer and since a stop restarting didn't work, I uninstalled the printer and tried to reinstall it.  Trying to reinstall, I get a fatal error m

  • Why my option 'save for web' under the menu FILE has disappeared?

    I am a user of Photoshop CC. Regularly, I do updates and restart my computer after the updates are complete. I feel (because I compared it with others) that for some reason any under the menu 'FILE', 'Save for web' option is no longer available to me

  • VCenter is virtual, and powered off

    Welcome.VCenter is a virtual machine.The machine that vcenter works on is off.How do I turn it back on?(Obviously not the Vsphere client...)Thank you!