Skip to main content

 Configuration

Configuration manual for PageSeeder

Media types

Media types can be used to:

  • Store metadata about any non-PSML file using all the features of PSML properties.
  • Extract, and store as editable properties, metadata from the following binary file types:
    • Microsoft Office (.docx, .xlsx, .pptx).
    • PDF (.pdf).
    • Images (.jpg, .jpeg, .gif, .png).
  • Attach editable properties to external URLs.

Extraction

PageSeeder can extract metadata when uploading files, or by reprocessing existing files through the option on the document types page.

To preview the raw metadata, on the document types page, click the “eye” icon that is visible in the Template column beside the media type.

On the upload document dialogue, developer options are available, where the metadata and properties from newer versions of a file can overwrite existing metadata. 

Alternatively, the metadata properties can be viewed anywhere the document properties are displayed.

Following are the default field names available for each file type.

Microsoft Office

dc-title
dc-description
dc-creator
dc-subject
cp-keywords
cp-category
cp-revision
cp-version
dcterms-created
dcterms-modified

PDF

docinfo-title
docinfo-subject
docinfo-keywords
docinfo-author
docinfo-creator
docinfo-producer
docinfo-creationdate
docinfo-moddate
docinfo-[any custom property]

Images

iptc-keywords
exif-image-description
exif-user-comment
exif-artist
exif-date-time
exif-date-time-orginal
exif-image-width
exif-image-height
exif-x-resolution (dpi)
exif-y-resolution (dpi)
exif-copyright
exif-focal-length (mm)
exif-f-number
exif-iso-speed-ratings
exif-gps-altitude (meters)
exif-gps-altitude-ref
exif-gps-latitude
exif-gps-latitude-ref
exif-gps-longitude
exif-gps-longitude-ref
exif-gps-dest-latitude
exif-gps-dest-latitude-ref
exif-gps-dest-longitude
exif-gps-dest-longitude-ref

The following clean-up is done on metadata when they are used in document templates:

  • cp-keywords, docinfo-keywords, iptc-keywords:
    • Replace ';' by ','.
    • Then remove any spaces after or before ','.
    • Then replace other non-label chars by '_'.
    • Then truncate to 250 chars at last comma.
  • dc-title, docinfo-title, exif-image-description:
    • Truncate to 250 chars.

Configuration

The media-template.psml controls the processing of the metadata fields for each file type. It is available through the template configuration page or template files page.

Template configuration – Media types

Following are the default media-template.psml files for different file extensions. They follow the same format as document templates except that @level on <document> must be metadata.

The metadata fields are inserted by using {$meta.[field name]} for attributes and <t:value name="meta.[field name]" /> for content.

To change these, on the template configuration page, in the template column, click the override option for a default media template or click the the create or edit option for an existing media type. Click the Create media type... button to create a new media type. After creating or modifying a media template, all relevant files can be updated using the Reprocess... button and choosing either:

  • “Add new metadata properties only (preserve existing)”

or

  • “Overwrite all metadata and document properties (title, docid, description, labels)”

.docx, .pptx, .xlsx

<document xmlns:t="http://pageseeder.com/psml/template"
          level="metadata">
  <documentinfo>
    <uri title="{$meta.dc-title}">
      <description>
        <t:value name="meta.dc-description" />
      </description>
      <labels>
        <t:value name="meta.cp-keywords" />
      </labels>
    </uri>
  </documentinfo>
  <metadata>    
    <properties>
      <property name="author"
                title="Author"
                value="{$meta.dc-creator}" />
    </properties>
  </metadata>
</document>

.pdf

<document xmlns:t="http://pageseeder.com/psml/template"
          level="metadata">
  <documentinfo>
    <uri title="{$meta.docinfo-title}">
      <description>
        <t:value name="meta.docinfo-subject" />
      </description>
      <labels>
        <t:value name="meta.docinfo-keywords" />
      </labels>
    </uri>
  </documentinfo>
  <metadata>    
    <properties>
      <property name="author"
                title="Author"
                value="{$meta.docinfo-author}" />
    </properties>
  </metadata>
</document>

.gif, .jpg, .png

<document xmlns:t="http://pageseeder.com/psml/template"
          level="metadata">
  <documentinfo>
    <uri title="{$meta.exif-image-description}">
      <description>
        <t:value name="meta.exif-user-comment" />
      </description>
      <labels>
        <t:value name="meta.iptc-keywords" />
      </labels>
    </uri>
  </documentinfo>
  <metadata>    
    <properties>
      <property name="author"
                title="Author"
                value="{$meta.exif-artist}" />
      <property name="latitude"
                title="Latitude"
                value="{$meta.exif-gps-latitude}
                       {$meta.exif-gps-latitude-ref}" />

      <property name="longitude"
                title="Longitude"
                value="{$meta.exif-gps-longitude}
                       {$meta.exif-gps-longitude-ref}" />
    </properties>
  </metadata>
</document>

Metadata processing makes uploads slower. If there is no requirement for metadata, removing references to  meta. fields from the media template makes uploads faster. To disable metadata processing altogether, add the following to the media-template.psml:

<document level="metadata">
</document>

Editing

Metadata for a file can be edited through the Metadata tab on the Document info & metadata panel, or the Publication tab if the document is part of a publication. Alternatively, the format Sheet option, available on the search page supports bulk editing of properties in a spreadsheet-like view (see following example).

Document info & metadata panel – Metadata

Edit sheet

Edit sheet – Image metadata

The metadata editor behavior is configurable through the editor-config.xml for the editor name PSMLMetadata using the same options as the PSML properties editor.

To create this file, in the Editing column, click create in the row for the media type. Following is an example editor-config.xml file.

<editor-configs>
  <editor-config name="PSMLMetadata">
    <field name="width"
           type="text"
           label="Width"
           pattern="[0-9]" />
    <field name="height"
           type="text"
           label="Height"
           pattern="[0-9]" />
    <field name="hi-res" type="xref" label="Hi-res">
      <xref-config>
        <target filters="pssubtype:image" />
      </xref-config>
    </field>
    <field name="action" type="select" label="Action">
      <value>None</value>
      <value>Zoom</value>
      <value>Fullscreen</value>
    </field>
  </editor-config>
</editor-configs>

Further information about PageSeeder support for metadata, and how to process it, is available through the following tutorial:

How to use metadata to substitute lo-res with hi-res images.

Created on , last edited on