How do I customize the logo that displays on the public user interface generated PDF coverpage?

Follow

Environment: Tested with ArchivesSpace version 2.4.1 on Windows 10 Local Test Server

This article describes 3 options for customizing the logo that displays on PDFs generated in the public user interface (pui).

Option #1 is the easy route.

  1. Login to the ArchivesSpace Staff Interface with your staff credentials.
  2. Select the System menu and Manage Repositories.
  3. Select the repository you want to brand generated PDFs and click Edit.
  4. Edit the "Branding Image URL" field and enter a link to the logo you want to appear for this repository's generated PDFs.  This logo will also appear on the public interface for that repository.  See images below for examples.
    1. Note that the "Branding Image URL" should be 255 characters or less and that the image will resize on the generic repository screen but will be full size on the PDF coverpage.
    2. It may require some time for the indexer to pick this up and display the image.  Your server administrator can force re-index by deleting your "\archivesspace\data\indexer_pui_state" and "\archivesspace\data\indexer_pui_state" files.

repositorylogo.PNG

 

pdflogo.PNG

Option #2.

This option requires:

  • The pui_branding_img is set pointing to a location that exists.
    • The pui_branding_img is found in the "archivesspace\config\config.rb" file. Here is an example: AppConfig[:pui_branding_img] = 'images/logo.png'
    • Changing the config.rb file requires an ArchivesSpace restart.
  • The local plugin is properly loaded.
  1. If not already available, create this directory: \archivesspace\plugins\local\public\views\pdf
  2. Copy in the _titlepage.html.erb folder from the matching version of ArchivesSpace on Github.  For our example we used https://github.com/archivesspace/archivesspace/blob/master/public/app/views/pdf/_titlepage.html.erb
  3. Change line #2 to change the asset_Path file to "pui_branding_img" as in this example:
    <div class="logo"><%= image_tag( record.resolved_repository['image_url'] || asset_path(AppConfig[:pui_branding_img]) ) %></div>
  4. This will brand the pdf for the repository with the pui_branding_image.

Note: If a repository record has a designated branding image URL in its configuration record, that image will override the plugin image.

 

Option #3

 This option requires:

  • The local plugin is properly loaded.
  • The local plugin is enabled by removing the comment marks (# signs) from in front of the plugin line in  config.rb
    • ## Plug-ins to load. They will load in the order specified
      AppConfig[:plugins] = ['local']
  1. If not already available, create these directories:
    1. \archivesspace\plugins\local\public\views\pdf
    2. \archivesspace\plugins\local\public\assets\images\
  2. Add the logo.png (or other logo file) to \archivesspace\plugins\local\public\assets\images\ directory.
  3. Copy the _titlepage.html.erb file from the matching version of ArchivesSpace on Github to \archivesspace\plugins\local\public\views\pdf. For our example we used https://github.com/archivesspace/archivesspace/blob/master/public/app/views/pdf/_titlepage.html.erb
  4. Edit the copied _titlepage.html.erb by changing line #2  asset_Path file to the logo file as in this example:
     <div class="logo"><%= image_tag( record.resolved_repository['image_url'] || asset_path("images/logo.png") ) %></div>
  5. This will brand the PDF with a specific image as designated in the line above.

Note: If a repository record has a designated branding image URL in its configuration record, that image will override the plugin image.

 

 

Other resources:

http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/2017-August/005050.html Discussion on PDF Image Branding

http://archivesspace.github.io/archivesspace/user/archivesspace-plug-ins-readme/ Info on plugins

https://github.com/archivesspace/archivesspace/tree/master/public GITHUB PUI Info

http://archivesspace.github.io/archivesspace/user/customizing-and-theming-archivesspace/ Customizing and Theming ArchivesSpace

Questions?

If this article didn’t resolve your issue, please take a moment and answer a few questions to help improve our documentation:

Feedback