Uploaded image for project: 'Forrest (Retired)'
  1. Forrest (Retired)
  2. FOR-1072

[PATCH] Bugfixes and improvements for PDF output plugin

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9
    • 0.9
    • Plugin: output.pdf
    • None

    Description

      I've been playing with Forrest Trunk to get the FOP website to work. I found a number of problems which I've fixed with the attached patch. The changes in detail:
      - PDFs generated from an FAQ page inserted the section number (1.1, 1.2 etc.) twice in front of the section title. I've just filtered it now. It may not be the best way to fix this.
      - Added a bookmark entry for the table of contents if it is enabled.
      - Added keep-with-next.within-column="always" for all section titles, header elements of note/warning/fixme boxes and table captions. The new FOP supports keeps so you should use them. Otherwise, page break decision can be really ugly.
      - Added keep-with-previous.within-column="always" for note/warning/fixme boxes so the don't land on a new page as first elements. This preserves the context.
      - table rows with th elements are now placed in the fo:table-header, so the headers are repeated on each page the table spans.
      - Used proportional-column-width(1) instead of a fixed width calculation for the column widths which automatically makes use of the whole page width regardless of the page margin settings.
      - Fixed placement of page number and document title depending on "double-sided" setting. --> Page number to the "outside" and document title to the "inside".
      - Filtered out link elements with no href (which are created by html-to-document.xsl for "<a name=..."). Forrest 0.7 didn't generate them as links at all but trunk does. Maybe that's wrong in the first place.

      I'd appreciate a quick turn-around with this patch (if possible) as this would allow us to switch to Forrest Trunk for the FOP 0.95 release (we want to eat our own dogfood). Without this patch, our compliance PDF page fails due to the "<link name=" in it. Thanks a lot!

      Attachments

        1. forrest-pdf-touchup.patch
          11 kB
          Jeremias Maerki
        2. forrest-pdf-touchup2.patch
          3 kB
          Jeremias Maerki
        3. forrest-pdf-touchup3.patch
          6 kB
          Jeremias Maerki
        4. forrest-pdf-touchup4.patch
          9 kB
          Jeremias Maerki

        Activity

          People

            Unassigned Unassigned
            jeremias@apache.org Jeremias Maerki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: