I think I got possessed by a malignant demon last night, because today I decided to play around with Adobe's page-map extension and discover its undocumented quirks.
I finally found solutions to my problems through intensive experimentation (aka trial-and-error) on version 1.7.2 and am writing them up here since I can find no mention of them elsewhere (probably because people don't use this extension that much).
Failure to obey these rules will lead to premature hair loss and a large dental bill.
1) If a page entry in the page-map file points to the first page in a flow, then the href
MUST point to the file itself and
NOT to a fragment within it.
Let's say you've been tempted into automating the creation of the page map and have the following entries in your page-map file:
Code:
<page name="1" href="content1.xhtml#page1"/>
<page name="2" href="content1.xhtml#page2"/>
<page name="3" href="content1.xhtml#page3"/>
<page name="4" href="content1.xhtml#page4"/>
<page name="5" href="content2.xhtml#page5"/>
<page name="6" href="content2.xhtml#page6"/>
Then ADE will display bizarre behaviour with page numbers appearing out of sequence or doubled-up at the same position even though all the anchors are properly formed and in the right places.
The page-map file should instead look like this:
Code:
<page name="1" href="content1.xhtml"/>
<page name="2" href="content1.xhtml#page2"/>
<page name="3" href="content1.xhtml#page3"/>
<page name="4" href="content1.xhtml#page4"/>
<page name="5" href="content2.xhtml"/>
<page name="6" href="content2.xhtml#page6"/>
2) The anchor identifying a page
MUST occur in a block that also contains text.
Code:
<p class="graphic"><a id="page013"/><img alt="" src="[path]"/></p>
Will result in the page-number not showing in the margin, although it is still reported in the status-bar. Instead, the anchor should be moved to the closest block that contains text (i.e. either the end of the previous paragraph of text or the start of the following one).