Forrest
  1. Forrest
  2. FOR-355

Improved PDF configurability (e.g., TOC, Page Numbers, logo)

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.7
    • Fix Version/s: None
    • Component/s: Plugin: output.pdf
    • Labels:
      None
    • Other Info:
      Patch available

      Description

      This change would probably involve skinconf.xml changes, as well as document2fo.xsl changes.

      It would be great to be able to configure the PDF output for the following options:
      - page numbers (ON/OFF)
      - more control over information in footer (ON/OFF, copyright info, credits)
      - Table of Contents generation (on a 1-page xdoc, it seems silly to generate a TOC page)
      1. pdf-toc.patch
        2 kB
        Patrick Ohly
      2. patchPageNumberingFormat.txt
        7 kB
        Cyriaque Dupoirieux

        Issue Links

          Activity

          Hide
          Johannes Schaefer added a comment -
          Forrest still lacks a mechanism to configure the plugins without changing skinconf.xml
          Show
          Johannes Schaefer added a comment - Forrest still lacks a mechanism to configure the plugins without changing skinconf.xml
          Hide
          Thorsten Scherler added a comment -
          What is missing on this issue to close it?
          Show
          Thorsten Scherler added a comment - What is missing on this issue to close it?
          Hide
          David Crossley added a comment -
          Above, Johannes mentioned that he contributed some front-piece title page (which has not yet been integrated). Here is the proper link: FOR-275.
          Show
          David Crossley added a comment - Above, Johannes mentioned that he contributed some front-piece title page (which has not yet been integrated). Here is the proper link: FOR-275 .
          Hide
          David Crossley added a comment -
          Thanks Patrick, i added the DTD stuff.

          I left this issue open because there are still some other configurability issues describe above. Not yet investigated to see if they are fixed.
          Show
          David Crossley added a comment - Thanks Patrick, i added the DTD stuff. I left this issue open because there are still some other configurability issues describe above. Not yet investigated to see if they are fixed.
          Hide
          Patrick Ohly added a comment -
          See pdf-dtd-update.patch in https://issues.apache.org/jira/browse/FOR-1013 for the missing changes.
          Show
          Patrick Ohly added a comment - See pdf-dtd-update.patch in https://issues.apache.org/jira/browse/FOR-1013 for the missing changes.
          Hide
          David Crossley added a comment -
          The patch is incomplete. See comments at: https://issues.apache.org/jira/browse/FOR-1013#action_12506376
          Show
          David Crossley added a comment - The patch is incomplete. See comments at: https://issues.apache.org/jira/browse/FOR-1013#action_12506376
          Hide
          Patrick Ohly added a comment -
          Thanks for applying this. Can someone also update main/fresh-site/src/documentation/skinconf.xml
          with an entry as in my comment? As I just learned from the discussion
          on the users mailing list that file is used by "forrest seed".
          Show
          Patrick Ohly added a comment - Thanks for applying this. Can someone also update main/fresh-site/src/documentation/skinconf.xml with an entry as in my comment? As I just learned from the discussion on the users mailing list that file is used by "forrest seed".
          Hide
          Brian M Dube added a comment -
          Patch applied r548613. Thanks.
          Show
          Brian M Dube added a comment - Patch applied r548613. Thanks.
          Hide
          Patrick Ohly added a comment -
          With this patch the table of content can be disabled via the skinconf.xml
          like this:

              ...
              <!--
                Disable the generation of the table of content on the first page
                of the PDF. By default the TOC is generated.
              -->
              <disable-toc>true</disable-toc>
            </pdf>

          In contrast to the first version of this patch posted to the users
          mailing list this revision produces the TOC if <disable-toc> is not
          set in the skinconf.xml because it uses the "string()" function; that
          always seems to properly initialize the "disable-toc" variable.

          Note that the patch does not change the skinconf.xml generated by
          "forrest seed".
          Show
          Patrick Ohly added a comment - With this patch the table of content can be disabled via the skinconf.xml like this:     ...     <!--       Disable the generation of the table of content on the first page       of the PDF. By default the TOC is generated.     -->     <disable-toc>true</disable-toc>   </pdf> In contrast to the first version of this patch posted to the users mailing list this revision produces the TOC if <disable-toc> is not set in the skinconf.xml because it uses the "string()" function; that always seems to properly initialize the "disable-toc" variable. Note that the patch does not change the skinconf.xml generated by "forrest seed".
          Show
          Johannes Schaefer added a comment - See also http://issues.cocoondev.org/browse/FOR-275
          Hide
          David Crossley added a comment -
          Left issue open becuase it describes other aspects of PDF configurability.
          Show
          David Crossley added a comment - Left issue open becuase it describes other aspects of PDF configurability.
          Hide
          David Crossley added a comment -
          Thanks Cyriaque, that is applied now. Your patches are a pleasure to work with.
          Show
          David Crossley added a comment - Thanks Cyriaque, that is applied now. Your patches are a pleasure to work with.
          Hide
          Cyriaque Dupoirieux added a comment -
          Patch to display the pdf page number using a format.

          How does it works :
          in skinconf.cml the new tag <page-numbering-format> (in <pdf>) defines your numbering pattern as follows :
          + first occurrence of '1' digit represents the current page number,
          + second occurrence of '1' digit represents the total page number,
          + anything else is considered as the static part of the numbering pattern.

          Examples : (x is the current page number, y the total page number.)
            <page-numbering-format>none</page-numbering-format>
                  Do not displays the page numbering
            <page-numbering-format>1</page-numbering-format>
                  Displays "x"
            <page-numbering-format>p1.</page-numbering-format>
                  Displays "px."
            <page-numbering-format>Page 1/1</page-numbering-format>
                  Displays "Page x/y"
          <page-numbering-format>(1-1)</page-numbering-format>
                  Displays "(x-y)"
          etc.

          Hope you'll like it,
          Regards,

          PS : I update skinconf.xsl (common) in order to set the default pattern to the current one : "Page x".
          Show
          Cyriaque Dupoirieux added a comment - Patch to display the pdf page number using a format. How does it works : in skinconf.cml the new tag <page-numbering-format> (in <pdf>) defines your numbering pattern as follows : + first occurrence of '1' digit represents the current page number, + second occurrence of '1' digit represents the total page number, + anything else is considered as the static part of the numbering pattern. Examples : (x is the current page number, y the total page number.)   <page-numbering-format>none</page-numbering-format>         Do not displays the page numbering   <page-numbering-format>1</page-numbering-format>         Displays "x"   <page-numbering-format>p1.</page-numbering-format>         Displays "px."   <page-numbering-format>Page 1/1</page-numbering-format>         Displays "Page x/y" <page-numbering-format>(1-1)</page-numbering-format>         Displays "(x-y)" etc. Hope you'll like it, Regards, PS : I update skinconf.xsl (common) in order to set the default pattern to the current one : "Page x".

            People

            • Assignee:
              Unassigned
              Reporter:
              Clay Leeds
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development