It will tend to export frames from left to right and from top to bottom of page. Is that the order you see on the affected pages?
Are you using the articles panel? If not, that would explain it.
For HTML export there are three modes for ordering content. This option is avilable in Content order section in General Tab of HTML export:
1. Based on Page Layout : This is the default one and the one you are using right now. The objects appear from the top left and the appearance may not match ID in this case.
2. Based on Articles Panel: Here you put your content in articles and then depending on the order the objects appear in Articles, the same order applies to HTML export.
Please refer this link to get a better idea about how Articles Panel works:
(this is the one you should be using )
3. Based on XML structure: This applies in case you have tagged content and wish to make xml structure as the reading order.
Thank you! What does it mean if option 2 and 3 are grayed out (unavailable)?
If options 2 and 3 are grayed out, it means you have not created an article in Articles panel and it is empty and you don't have anything in the structure pane as well. To view structure goto View->.Structure->Show Structure. To view Articles panel goto Window menu->Articles.
Thanks for your continuing support on this! I was able to confirm that the document had no article structure. But I'm still mystified. As an experiment, I created a single article by adding 100% of the content to a new article (ctrl-click the "+" in the articles window). This resulted in a single article ("article 1") that contains 3 sub-elements that each start with a bold, capital "T" ("text?") and are each followed by a snippet of my text within "<" and ">" braces. It appears these locations in my document are where the exported file gets out of order with the page layout in the editor (and in the exported PDF) When I double click these sub-elements, the editor jumps to that spot in the document and displays a bunch of blue and red lines that seem to connect different pages in the document. I'm guessing these sub-elements are something that was created (perhaps accidentally) by the creator of these documents. So I'm wondering, what are these sub-elements, what are these blue and red lines, and if they are the source of my problem, how can I eliminate them?
Sounds like linked/threaded text frames. You are probably seeing the connector blue and red lines based on two layers that are color-coded blue and red.
If you don't want the whole thing to translate to one text flow, then you will want to break the links between text frames on different pages, and make separate articles with separate text frame content added into each one.
Getting closer... So this document does indeed have two "layers". Since the document is nothing but a very large collection of text, I'm not sure why the author created them (or even he understands that he did). It also has 302 pages organized into 152 spreads. There appear to be many text frames that are not linked to any other frames as well as many which are. The content is simply a collection of letters, ranging from 1 to 5 pages in length. As I view the document on the screen within InDesign, all letters and pages are laid out in the correct order. The PDF export retains that order. Yet, the html export does not. There is no XML or Article structure. Still looking for some way to get the correct page order preserved in the html output. "Merging" the layers seems to have had no effect on this. I'd be quite happy to have the whole thing as one "text flow"...that is the goal with the html. Thanks for further tips!
UPDATE. It appears that the original author imported the large collection of letters and then used text frame linking to get them in chronological order. This seems to confuse the HTML output. An included script ("SplitStory.jsx") seems to remove all the links while leaving the text in place within the text frames. An HTML export after that has everything in the correct order. At this point, I could use:
1) Perspective on this solution. Is this a reasonable way to go about this (given that I don't plan to come back to the InDesign source files after the export)
2) Tips on how to further automate this. I have several hundred files and each of them seems to have anywhere from 1-N "stories". The SplitStory script seems to work only on the currently "selected" story" (as opposed to all stores in the document). Thus, I need a way to iterative over all the files, and run this script on each "story" within each file.