Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2385

[PATCH] Add ability to specify custom properties in the Document Information Dictionary

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • renderer/pdf

    Description

      It is possible to add custom key/value pairs in the Info dictionary of a PDF document. Those custom properties will appear in the ‘Custom’ tab of Adobe Reader’s ‘Document Properties’ window (not sure about other viewers though).

      This patch adds the possibility to do that. A pdf:info element can be added as a child of fo:declarations and contain the custom properties. For example:

      <fo:declarations>
        <pdf:info xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
          <pdf:name key="MyProperty">MyValue</pdf:name>
          <pdf:name key="MyOtherProperty">MyOtherValue</pdf:name>
        </pdf:info>
      </fo:declarations>
      

      Since it’s small, I thought that would be overkill to create a branch just for that. So I’m putting it here for peer review.

      If nobody objects by 2014/06/12, I’m going to commit this patch to trunk.

      Attachments

        1. pdf-custom-properties.patch
          25 kB
          Vincent Hennebert

        Activity

          People

            vhennebert Vincent Hennebert
            vhennebert Vincent Hennebert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: