Acroread's PDF cut and paste appears to depend on the order in which
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 20 Apr 2004 19:24:29 +0000 (19:24 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 20 Apr 2004 19:24:29 +0000 (19:24 +0000)
text fragments appear in the page graphics stream. Therefore, I
should take care to display the leaders _before_ the page number in
each contents entry.

git-svn-id: svn://svn.tartarus.org/sgt/halibut@4105 cda61777-01e9-0310-a592-d414129be87e

bk_paper.c

index 81050cb..a9f6f24 100644 (file)
@@ -2004,13 +2004,6 @@ static void render_para(para_data *pdata, paper_conf *conf,
        wid = paper_width_simple(pdata, w);
        sfree(w);
 
-       render_string(pdata->last->page,
-                     pdata->fonts[FONT_NORMAL],
-                     pdata->sizes[FONT_NORMAL],
-                     conf->paper_width - conf->right_margin - wid,
-                     (conf->paper_height - conf->top_margin -
-                      pdata->last->ypos), num);
-
        for (x = 0; x < conf->base_width; x += conf->leader_separation)
            if (x - conf->leader_separation > last_x - conf->left_margin &&
                x + conf->leader_separation < conf->base_width - wid)
@@ -2020,6 +2013,13 @@ static void render_para(para_data *pdata, paper_conf *conf,
                              conf->left_margin + x,
                              (conf->paper_height - conf->top_margin -
                               pdata->last->ypos), L".");
+
+       render_string(pdata->last->page,
+                     pdata->fonts[FONT_NORMAL],
+                     pdata->sizes[FONT_NORMAL],
+                     conf->paper_width - conf->right_margin - wid,
+                     (conf->paper_height - conf->top_margin -
+                      pdata->last->ypos), num);
     }
 
     /*