Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: Plugin: output.pdf
    • Labels:
      None
    • Urgency:
      Normal
    • Other Info:
      Patch available

      Description

      In case someone else has the same problem: my PDFs generated by Forrest
      contained relative URLs for site-internal links which the PDF viewer
      then couldn't open because it didn't know the start URL. Attached is a
      patch for document-to-fo.xsl which turns relative URLs into absolute
      ones in the PDF. It applies to 0.8 cleanly only after also applying the
      PDF summary patch in https://issues.apache.org/jira/browse/FOR-355#action_12505910
      Otherwise be prepared for a few line offset warnings.

      I enabled this in my skinconf.xml with:
          ...
          <!--
            Normally all links inside a Forrest site are relative. This
            does not work well in PDFs which are typically viewed outside of
            the web site. Setting this option adds the given prefix to all
            relative URLs, both to the link as well as the optional, additional text.
          -->
          <url-prefix>http://www.estamos.de/&lt;/url-prefix>
        </pdf>
      1. pdf-absolute-url.patch
        3 kB
        Patrick Ohly
      2. pdf-dtd-update.patch
        3 kB
        Patrick Ohly

        Activity

        David Crossley made changes -
        Fix Version/s 0.9-dev [ 12310041 ]
        Assignee David Crossley [ crossley ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Hide
        David Crossley added a comment -
        The DTDs should be working now.

        I found that nothing needed to be added to the skinconf pipeline transformations (in particular main/webapp/skins/common/skinconf.xsl) which seem to be only needed if default=true is required or other default settings.
        Show
        David Crossley added a comment - The DTDs should be working now. I found that nothing needed to be added to the skinconf pipeline transformations (in particular main/webapp/skins/common/skinconf.xsl) which seem to be only needed if default=true is required or other default settings.
        Hide
        David Crossley added a comment -
        Thanks, i will do the rest of the work. It needs adding to the XML Catalog at main/webapp/resources/schema/

        No-one should be using the DTDs at f.a.o/dtd/ ... As that page says, all tools should be using the Catalog.

        However, you are correct. Old DTDs definitely are catered for by Forrest's Catalog and refers to the local copies at $FORREST_HOME/main/webapp/resources/schema/

        The other side of this task, is to add to the skinconf styelsheet(s) to set the defaults.
        Show
        David Crossley added a comment - Thanks, i will do the rest of the work. It needs adding to the XML Catalog at main/webapp/resources/schema/ No-one should be using the DTDs at f.a.o/dtd/ ... As that page says, all tools should be using the Catalog. However, you are correct. Old DTDs definitely are catered for by Forrest's Catalog and refers to the local copies at $FORREST_HOME/main/webapp/resources/schema/ The other side of this task, is to add to the skinconf styelsheet(s) to set the defaults.
        David Crossley made changes -
        Assignee David Crossley [ crossley ]
        Brian M Dube made changes -
        Other Info [Patch available]
        Patrick Ohly made changes -
        Attachment pdf-dtd-update.patch [ 12360322 ]
        Hide
        Patrick Ohly added a comment -
        David, thanks for pointing out the need to update the DTD. I hadn't actually run "forrest site" since changing my skinconf.xml, so I wasn't aware of this. It works again now. As both new config options were already committed here's one patch which fixes the DTD for both options:

        Almost completes the work of adding new PDF generation configuration options:
        - updates DTD
        - updates example skinconf.xml

        To keep the patch size small the DTD file is not yet renamed. After applying
        the patch, please
        - rename the modified file with subversion before committing
        - make sure the modified DTD is published on http://forrest.apache.org/dtd/

        Other skinconf.xml files in the repository have not been touched. Feel
        free to do so. My understanding is that http://forrest.apache.org/dtd/
        will continue to host the older revisions so that one is not forced to
        update a skinconf.xml unless the new options are to be used.
        Show
        Patrick Ohly added a comment - David, thanks for pointing out the need to update the DTD. I hadn't actually run "forrest site" since changing my skinconf.xml, so I wasn't aware of this. It works again now. As both new config options were already committed here's one patch which fixes the DTD for both options: Almost completes the work of adding new PDF generation configuration options: - updates DTD - updates example skinconf.xml To keep the patch size small the DTD file is not yet renamed. After applying the patch, please - rename the modified file with subversion before committing - make sure the modified DTD is published on http://forrest.apache.org/dtd/ Other skinconf.xml files in the repository have not been touched. Feel free to do so. My understanding is that http://forrest.apache.org/dtd/ will continue to host the older revisions so that one is not forced to update a skinconf.xml unless the new options are to be used.
        Hide
        David Crossley added a comment -
        The patch is incomplete.

        See the comments at:
         Re: Stop PDF Summary...
         http://www.mail-archive.com/user@forrest.apache.org/msg02794.html

        New skin parameters need to be added to the default skinconf and XSL and new DTD. Search the code for another parameter (e.g. "disable-copyright-footer") to see how it is handled.

        I gather that you must have disabled skinconf validation in forrest.properties file.
        Show
        David Crossley added a comment - The patch is incomplete. See the comments at:  Re: Stop PDF Summary...   http://www.mail-archive.com/user@forrest.apache.org/msg02794.html New skin parameters need to be added to the default skinconf and XSL and new DTD. Search the code for another parameter (e.g. "disable-copyright-footer") to see how it is handled. I gather that you must have disabled skinconf validation in forrest.properties file.
        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 the issue description with an empty prefix? 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 the issue description with an empty prefix? As I just learned from the discussion on the users mailing list that file is used by "forrest seed".
        Brian M Dube made changes -
        Other Info [Patch available]
        Hide
        Brian M Dube added a comment -
        Patch applied r548615. Thanks.
        Show
        Brian M Dube added a comment - Patch applied r548615. Thanks.
        Patrick Ohly made changes -
        Field Original Value New Value
        Attachment pdf-absolute-url.patch [ 12360058 ]
        Hide
        Patrick Ohly added a comment -
        Adds url-prefix to skinconfig.xml which can be used to turn relative URLs into absolute ones.
        Show
        Patrick Ohly added a comment - Adds url-prefix to skinconfig.xml which can be used to turn relative URLs into absolute ones.
        Patrick Ohly created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Patrick Ohly
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development