How can we change the PDF display page number?

 Generally every PDF shows "1" when we open it on Acrobat but I want to change from "1" to "i" or "A"

Parents Reply
  • Hi Shahnawaz,

    I think that what you want to adjust within the PDF are referred to as 'page labels'.

    I believe I had a similar requirement some time ago and at that time posted a solution to the User Group. I'll paste it in below in case it may of use to you.

    cheers,

    Paul
    Letterpart Ltd

    = = = = = =

    Subject = PDFs - adjusting page number displayed in Reader status bar

    If anyone is interested here are the details of an alternative way I found of automatically adding page labels to an XPP generated PDF file.
     
     
     
    1. added a frill block to every Page Layout, even those which don't have a printed folio. Each of those frill blocks call a macro called <pdfPageLabel>
     
    2. In the XX macro spec set up the pdfPageLabel macro to save the formatted page number into a text register ready for use by XyPerl:
      <px;247><ri;%p4;%fmt4><pa></Pb;p;pdfUtils.pl;pdfSubs::pageLabel()>
     
    3. Set up a XyPerl program called pdfUtils.pl to output a PDF XyMacro that would in turn issue a pdfmark command to create a page label for the current page:
      use strict;
      use warnings;

      use XPPcompo;
     
      package pdfSubs;
     
      ## ======================================================
      sub pageLabel {

      ## ======================================================

       my $X = XPPcompo->new();

       my $label = $X->get_text(247,'d');

       print "<:pdfs;GEN;[ /Label (".$label.") /PAGELABEL pdfmark><:pdfe;GEN>";

      } # end sub
     
      1;
     
     
    In my test job I had 512 pages including 54 pages of prelims. The page information displayed in the status bar went from:
     i (1 of 512)   through to    liv (54 of 512)
    and then
     1 (55 of 512)  through to    458 (512 of 512)
     
     
    I did discover a few quirks about these page labels along the way.
    For the 45th prelim page, where I had assigned the label "xlv", any Reader prior to version 8 would display that roman number as "vl".
    This odd display of roman numbers was consistent in the range 45-49. 
    The odd conversion seems to have been corrected in Reader v8.
    Another strange thing was that whether "xlv" or "vl" was displayed on the status bar I could always type in either number and go to the correct page. 

Children