Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-5396

[Export PDF] : The table of contents is not displayed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.4.7, 3.5.5, 3.7, 3.9
    • 3.7
    • None
    • None

      1. CMS_PDFExport_handle_toc.patch
        6 kB
      2. HTMLvsPDF.png
        HTMLvsPDF.png
        235 kB
      3. HTMLvsPDF2.jpg
        HTMLvsPDF2.jpg
        496 kB
      4. KO.png
        KO.png
        89 kB
      5. TOC-counters.PNG
        TOC-counters.PNG
        20 kB

        [CMS-5396] [Export PDF] : The table of contents is not displayed

        Table of content with CSS counters

        Laurence Aumeunier added a comment - Table of content with CSS counters

        Laurence Aumeunier added a comment - - edited

        In HTML nested ordered list can be done in css with counters (CSS 2.1 specifications, not supported for IE7 and lower )

        .ametys-cms-content ol.nested {
            counter-reset: section;                
            list-style-type: none;
        }
        
        .ametys-cms-content ol.nested ol {
        	margin: 0 0 0 2em;
        }
        
        .ametys-cms-content ol.nested li:before {
            counter-increment: section;            
            content: counters(section, ".") ". ";  
        }
        

        Laurence Aumeunier added a comment - - edited In HTML nested ordered list can be done in css with counters (CSS 2.1 specifications, not supported for IE7 and lower ) .ametys-cms-content ol.nested { counter-reset: section; list-style-type: none; } .ametys-cms-content ol.nested ol { margin: 0 0 0 2em; } .ametys-cms-content ol.nested li:before { counter-increment: section; content: counters(section, "." ) ". " ; }

        Laure Lopez added a comment -

        The counting format of the web page is different than this one of the PDF. See the screenshot HTMLvsPDF2.

        Laure Lopez added a comment - The counting format of the web page is different than this one of the PDF. See the screenshot HTMLvsPDF2.

        The fix cause a error in generation of PDF catalog

        Caused by: org.apache.fop.fo.ValidationException: Property id "N100A9-chapter-refid-1" previously used; id values must be unique in document.
        	at org.apache.fop.fo.FObj.checkId(FObj.java:176)
        	at org.apache.fop.fo.FObj.startOfNode(FObj.java:156)
        	at org.apache.fop.fo.flow.Block.startOfNode(Block.java:138)
        	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:295)
        

        The ids are not unique for each aggregated contents

        Laurence Aumeunier added a comment - The fix cause a error in generation of PDF catalog Caused by: org.apache.fop.fo.ValidationException: Property id "N100A9-chapter-refid-1" previously used; id values must be unique in document. at org.apache.fop.fo.FObj.checkId(FObj.java:176) at org.apache.fop.fo.FObj.startOfNode(FObj.java:156) at org.apache.fop.fo.flow.Block.startOfNode(Block.java:138) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:295) The ids are not unique for each aggregated contents

        Still not OK. The chapter numbering is worst in new patch. See KO.PNG

        Laurence Aumeunier added a comment - Still not OK. The chapter numbering is worst in new patch. See KO.PNG

        In your patch, the PDF version does not conform to the HTML view:

        • title "Table of contents" should not appear
        • the chapter numbering is bad when table of content is inserted in middle of the page
        • the space between two chapter is too high
          See HTMLvsPDF.png for details

        Laurence Aumeunier added a comment - In your patch, the PDF version does not conform to the HTML view: title "Table of contents" should not appear the chapter numbering is bad when table of content is inserted in middle of the page the space between two chapter is too high See HTMLvsPDF.png for details

          quentin Quentin Glinel-Mortreuil (Inactive)
          lperier Laurence Perier
          Votes:
          1 Vote for this issue
          Watchers:
          3 Start watching this issue

            Created:
            Updated:
            Resolved: